- qijingheng2009-12-17金牌会员499
nginx.conf文件怎么写的啊,写在那里啊,
server
{
listen 80;
server_name www.meiinv.com;
server_name meiinv.com;
index index.html index.htm index.php;
root /home/meiinv;#limit_conn crawler 20;
#location /status {
#stub_status on;
#jiepaisiwa_log off;
#}
location / {
rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last;
rewrite ^/forum-([0-9]+)-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /viewthread.php?tid=$1&extra=page%3D$3&page=$2 last;
rewrite ^/space-(username|uid)-(.+)\.html$ /space.php?$1=$2 last;
rewrite ^/tag-(.+)\.html$ /tag.php?name=$1 last;
break;
}location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/tmp/php-cgi.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}location ~ .*\.(js|css)?$
{
expires 12h;
}log_format meiinv '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log /home/logs/meiinv.log meiinv;
}[ 本帖最后由 qijingheng 于 2009-12-17 14:28 编辑 ]