VPS侦探论坛

 找回密码
 注册
查看: 5423|回复: 3

伪静态设置成功,reload成功,访问失败

[复制链接]
发表于 2012-6-4 15:54:38 | 显示全部楼层 |阅读模式

[root@localhost conf]# more taodi.conf
rewrite (.+)product\.php/(.+)\.html$ $1product.php?rule=$2 last;
rewrite (.+)list\.php/(.+)\.html$ $1list.php?rule=$2 last;
rewrite (.+)shopsearch\.php/(.+)\.html$ $1shopsearch.php?rule=$2 last;
rewrite (.+)shop\.php/(.+)\.html$ $1shop.php?rule=$2 last;
rewrite (.+)pic\.php/(.+)\.jpg$ $1pic.php?url=$2 last;
rewrite (.+)url\.php/(.+)\.html$ $1url.php?u=$2 last;
if (!-e $request_filename) {
        return 404;
}
以下是网站的规则
[root@localhost vhost]# more www.aaa.com.conf

server
    {
        listen       80;
        server_name www.aaa.com aaa.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/www.aaa.com;

        include discuzx.conf;
        include taodi.conf;
                location ~ .*\.(php|php5)?$
            {
                try_files $uri =404;
                fastcgi_pass  unix:/tmp/php-cgi.sock;
                fastcgi_index index.php;
                include fcgi.conf;
            }

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
            {
                expires      30d;
            }

        location ~ .*\.(js|css)?$
            {
                expires      12h;
            }

        access_log off;
    }

执行./lnmp reload成功,但是访问就返回404
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-6-4 17:11:26 | 显示全部楼层


可能伪静态有问题吧
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2012-6-4 18:04:55 | 显示全部楼层

include discuzx.conf;
        include taodi.conf;


还放两个规则。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-6-5 19:43:09 | 显示全部楼层



我把两个规则合并放在网站根目录下的nginx.conf下重新加载就可以用了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-23 03:32 , Processed in 0.025489 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表