Board logo

标题: [求助] 求助各位大大帮我写个nginx的404错误和301转向的rewrite规则吧··· [打印本页]

作者: wang3623246    时间: 2011-12-1 17:45     标题: 求助各位大大帮我写个nginx的404错误和301转向的rewrite规则吧···

server {
        listen       80;
        server_name xxx.com www.xxx.com;
        root /www/web/xxx_com/public_html;
        index  index.html index.php index.htm;
        location ~ \.php$ {
                proxy_pass http://127.0.0.1:88;
                include naproxy.conf;
        }
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
                expires      1d;
        }
        location ~ .*\.(js|css|html|htm)?$ {
                expires      12h;
        }
        location / {
                try_files $uri @apache;
        }
        location @apache {
                 proxy_pass http://127.0.0.1:88;
                 include naproxy.conf;
        }
        access_log  logs/xxx.com_access.log  wwwlogs;
}
作者: admin    时间: 2011-12-1 20:12

看论坛贴子




欢迎光临 WDlinux官方论坛 (http://www.wdlinux.cn/bbs/) Powered by Discuz! 7.2