VPS侦探论坛

 找回密码
 注册
查看: 5634|回复: 2

都0.8了还是没把php的404弄好

 关闭 [复制链接]
发表于 2011-12-19 20:00:52 | 显示全部楼层 |阅读模式

nginx.conf
  1.                 location ~ .*\.(php|php5)?$
  2.                         {
  3.                                 try_files $uri =404;
  4.                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  5.                                 fastcgi_index index.php;
  6.                                 include fcgi.conf;
  7.                         }
复制代码
vhost.sh
  1.                 location ~ .*\.(php|php5)?$
  2.                         {
  3.                                 try_files        \$uri =404;
  4.                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  5.                                 fastcgi_index index.php;
  6.                                 include fcgi.conf;
  7.                         }
复制代码
这样就行了

要不顺便加上substitutions4nginx-read-only
应该满多人会用到

[ 本帖最后由 malsvent 于 2011-12-19 20:03 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-12-20 10:39:24 | 显示全部楼层


留个脚印。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2012-9-2 22:01:38 | 显示全部楼层

楼主啥意思?也没见军哥发表意见。

难道楼主的意思是只要改那个斜杠?即可完成404?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-23 17:13 , Processed in 0.026558 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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