VPS侦探论坛

 找回密码
 注册
查看: 4737|回复: 4

lnmp伪静态无法成功

[复制链接]
发表于 2016-3-31 10:25:32 | 显示全部楼层 |阅读模式

在/usr/local/nginx/conf  目录下 建立py.conf

虚拟主机配置文件vhost下的www.xxxxx.com.conf
加载配置文件
nginx -t  测试通过
lnmp restart  重启了lnmp

include py.conf;访问网站任何页面都是404

server
    {
        listen 80;
        #listen [::]:80;
        server_name www.xxx.com xxx.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/www.xxx.com;

        include py.conf;
        #error_page   404   /404.html;
        location ~ [^/]\.php(/|$)
        {
            # comment try_files $uri =404; to enable pathinfo
            try_files $uri =404;
            fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_index index.php;
            include fastcgi.conf;
            #include pathinfo.conf;
        }

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {

[ 本帖最后由 thinkfor 于 2016-3-31 10:29 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2016-3-31 13:53:16 | 显示全部楼层


既没有说是什么程序,也没有说伪静态是啥
信息有限不好说
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2016-3-31 16:07:03 | 显示全部楼层

ecms 帝国的程序

# Warning: unsupported at line 2:
# RewriteBase /
rewrite ^/m_([0-9]+).html$ /e/action/tv.php?id=$1;

rewrite ^/r_([0-9]+).html$ /e/action/ShowInfo.php?classid=2&id=$1;

rewrite ^/mv/1-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/action/ListInfo.php?classid=1&ph=1&type=$1&area=$2&year=$3&orderby=$4&page=$5&u=mv;

rewrite ^/mv/$ /e/action/ListInfo.php?classid=1&u=mv;

rewrite ^/tv/3-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/action/ListInfo.php?classid=3&ph=1&type=$1&area=$2&year=$3&orderby=$4&page=$5&u=tv;

rewrite ^/tv/$ /e/action/ListInfo.php?classid=3&u=tv;


rewrite ^/list/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/action/List.php?classid=2&ph=1&cat=$1&type=$2&area=$3&year=$4&picture=$5&page=$6;

rewrite ^/$ /e/action/List.php?classid=2;
rewrite ^/index.php$ /e/action/List.php?classid=2;
rewrite ^/index.html$ /e/action/List.php?classid=2;

rewrite ^/d_([0-9]+).html$ /down.php?id=$1;

[ 本帖最后由 thinkfor 于 2016-3-31 16:12 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2016-3-31 17:34:47 | 显示全部楼层



这个程序不清楚,你可以去他们官网找个伪静态试试
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2016-4-1 15:00:09 | 显示全部楼层

Ng用伪静态
换apache吧

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-29 03:28 , Processed in 0.026592 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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