VPS侦探论坛

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

军哥的LNMP 默认NGINX静态规则用不了。

[复制链接]
发表于 2010-7-15 18:13:00 | 显示全部楼层 |阅读模式

安装了军哥的LNMP 然后添加了WORDPRESS DISCUZ默认的规则,但是无法访问。。




  1. location / {
  2.             rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last;
  3.             rewrite ^/forum-([0-9]+)-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2 last;
  4.             rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /viewthread.php?tid=$1&extra=page%3D$3&page=$2 last;
  5.             rewrite ^/space-(username|uid)-(.+)\.html$ /space.php?$1=$2 last;
  6.             rewrite ^/tag-(.+)\.html$ /tag.php?name=$1 last;
  7.         }
复制代码



求解
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2010-7-15 18:52:35 | 显示全部楼层

回复 1# 的帖子



贴虚拟主机配置
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2010-7-15 19:30:23 | 显示全部楼层

剛剛我也發生一樣的事情
由於我是放在 二級網址下 www.xxxx.org/bbs/
所以改了一下
location /bbs/
但此時又怪怪的 還是出現 404 = =
於是在將 下方的rewrite寫法改寫一下

變成
  1.    location /bbs/ {
  2. rewrite ^(.*)/archiver/((fid|tid)-[w-]+.html)$ $1/archiver/index.php?$2 last;
  3. rewrite ^(.*)/forum-([0-9]+)-([0-9]+).html$ $1/forumdisplay.php?fid=$2&page=$3 l$
  4. rewrite ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/viewthread.php?tid=$2&e$
  5. rewrite ^(.*)/profile-(username|uid)-(.+).html$ $1/viewpro.php?$2=$3 last;
  6. rewrite ^(.*)/space-(username|uid)-(.+).html$ $1/space.php?$2=$3 last;
  7. rewrite ^(.*)/tag-(.+).html$ $1/tag.php?name=$2 last;
  8.         }
复制代码
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2010-7-15 20:11:03 | 显示全部楼层

回复 3# 的帖子




重启nginx
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-8 09:14 , Processed in 0.027286 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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