一个NGINX实例,从生产环境里搬来的
一个NGINX实例,从生产环境里搬来的server
{
listen 80;
server_name chongqing.123.com cq.123.com;
root /var/www/123_chongqing;
location / {
indexindex.html index.htm index.php;
access_log off;
}
error_page 500 502 503 504/50x.html;
location = /50x.html {
root html;
}
access_log/var/log/nginx/Chongqing.log;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_indexindex.php;
fastcgi_paramSCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
rewrite ^/(.*)-htm-(.*)$ /$1.php?$2 last;
rewrite ^/(.*)/show-(+)([\-])?(+)?\.html$ /$1/show.php?itemid=$2&page=$4 last;
rewrite ^/(.*)/list-(+)([\-])?(+)?\.html$ /$1/list.php?catid=$2&page=$4 last;
rewrite ^/(.*)/show/(+)/(+)?([/])?$ /$1/show.php?itemid=$2&page=$3 last;
rewrite ^/(.*)/list/(+)/(+)?([/])?$ /$1/list.php?catid=$2&page=$3 last;
rewrite ^(.*)/(+)/(.*)\.shtml$ $1/$2/index.php?rewrite=$3 last;
rewrite ^/(com)/(+)/(+)/(.*)\.html$ /company/$3/index.php?homepage=$2&rewrite=$4 last;
rewrite ^/(com)/(+)/(+)([/])?$ /company/$3/index.php?homepage=$2 last;
rewrite ^/(com)/(+)([/])?$ /index.php?homepage=$2 last;
location /status {
stub_status on;
access_logoff;
}
}
[ 本帖最后由 eelou 于 2012-4-16 18:30 编辑 ]
不错,学习了
http://bbs.destoon.com/static/image/smiley/default/lol.gif
页:
[1]