ccloving 发表于 2012-1-15 14:49:28

lnmp0.8在禁止IP直接访问后,网站提示:No input file specified.

最新的0.8版按以下方法禁止IP地址直接访问,会有问题:
server{
      listen 80 default; #参数表示这个是默认虚拟主机
      server_name _;
      rewrite ^(.*) https://www.vpser.net permanent; #跳转到域名
      #return 500; #或者返回 500;
}

会造成网站提示:
No input file specified.
发现在后台里面的页面路径,本来应该是http://yyserver.net/wp-admin/index.php,变成了http://yyserver.net/index.php

改回默认就没有这个问题。
系统是debian,网站程序为wordpress.

军哥并各位,这是为啥呢?

licess 发表于 2012-1-15 19:03:02

你yyserver这个网站放在了默认虚拟主机里?

ccloving 发表于 2012-1-16 07:37:01

原帖由 licess 于 2012-1-15 19:03 发表 https://bbs.vpser.net/images/common/back.gif
你yyserver这个网站放在了默认虚拟主机里?

没放到默认的虚拟机里,不过虚拟机和默认文件夹里的帝国备份王都有这问题。

licess 发表于 2012-1-16 09:16:04

回复 3# 的帖子

设成ip不能直接访问,默认虚拟主机下的就都无法访问了,可能就是其他的虚拟主机配置有问题或伪静态的问题

ccloving 发表于 2012-1-16 10:04:27

原帖由 licess 于 2012-1-16 09:16 发表 https://bbs.vpser.net/images/common/back.gif
设成ip不能直接访问,默认虚拟主机下的就都无法访问了,可能就是其他的虚拟主机配置有问题或伪静态的问题

升级了nginx和PHP到最新版本,解决了。但却出现了这个问题:
启动时提示:
nginx nginx: the "log_format" directive may be used only on "http" level in /usr/local/nginx/conf/nginx.conf:85
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
nginx: the "log_format" directive may be used only on "http" level in /usr/local/nginx/conf/nginx.conf:85

不知道是不是哪里出错了 ?不过网站可以正常访问 85行 在 nginx.conf 是这么一段话


相关帖子:https://bbs.vpser.net/thread-6281-1-1.html

licess 发表于 2012-1-16 10:21:06

回复 5# 的帖子

你可以把log_format 从server段里移出来,可能是nginx调整了
页: [1]
查看完整版本: lnmp0.8在禁止IP直接访问后,网站提示:No input file specified.