linux下nginx配置之phpmyadmin与web

来源:互联网 发布:淘宝口腔无影灯 编辑:程序博客网 时间:2024/06/17 03:04

phpmyadmin配置如下:

server {        listen       80 default;        server_name  _;index index.html index.htm index.php;root /alidata/www/default;location ~ .*\.(php|php5)?${#fastcgi_pass  unix:/tmp/php-cgi.sock;fastcgi_pass  127.0.0.1:9000;fastcgi_index index.php;include fastcgi.conf;}location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)${expires 30d;}location ~ .*\.(js|css)?${expires 1h;}access_log  /alidata/log/nginx/access/default.log;}

注意:listen与server_name 也就是站点用ip访问方式。


web站点配置如下:

server {        listen       80;        server_name  xxx.com www.xxx.com;index index.html index.htm index.php;root /alidata/www/xxx_com;location ~ .*\.(php|php5)?${#fastcgi_pass  unix:/tmp/php-cgi.sock;fastcgi_pass  127.0.0.1:9000;fastcgi_index index.php;include fastcgi.conf;}location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)${expires 30d;}location ~ .*\.(js|css)?${expires 1h;}#伪静态规则include /alidata/server/nginx/conf/rewrite/xxx.conf;access_log  /alidata/log/nginx/access/xxx.log;}

注意root的站点路径

0 0
原创粉丝点击