thinkfor 发表于 2016-3-31 10:25:32

lnmp伪静态无法成功

在/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_passunix:/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 编辑 ]

licess 发表于 2016-3-31 13:53:16

既没有说是什么程序,也没有说伪静态是啥
信息有限不好说

thinkfor 发表于 2016-3-31 16:07:03

ecms 帝国的程序

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

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

rewrite ^/mv/1-(+)-(+)-(+)-(+)-(+).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-(+)-(+)-(+)-(+)-(+).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/(+)-(+)-(+)-(+)-(+)-(+).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_(+).html$ /down.php?id=$1;

[ 本帖最后由 thinkfor 于 2016-3-31 16:12 编辑 ]

licess 发表于 2016-3-31 17:34:47

这个程序不清楚,你可以去他们官网找个伪静态试试

smartweb 发表于 2016-4-1 15:00:09

Ng用伪静态:lol
换apache吧
页: [1]
查看完整版本: lnmp伪静态无法成功