VPS侦探论坛

 找回密码
 注册
查看: 6764|回复: 5

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

[复制链接]
发表于 2012-1-15 14:49:28 | 显示全部楼层 |阅读模式

最新的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.

军哥并各位,这是为啥呢?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-1-15 19:03:02 | 显示全部楼层


你yyserver这个网站放在了默认虚拟主机里?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-1-16 07:37:01 | 显示全部楼层

原帖由 licess 于 2012-1-15 19:03 发表
你yyserver这个网站放在了默认虚拟主机里?


没放到默认的虚拟机里,不过虚拟机和默认文件夹里的帝国备份王都有这问题。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-1-16 09:16:04 | 显示全部楼层

回复 3# 的帖子




设成ip不能直接访问,默认虚拟主机下的就都无法访问了,可能就是其他的虚拟主机配置有问题或伪静态的问题
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-1-16 10:04:27 | 显示全部楼层

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


升级了nginx和PHP到最新版本,解决了。但却出现了这个问题:
启动时提示:
nginx nginx: [warn] 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: [warn] 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

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

发表于 2012-1-16 10:21:06 | 显示全部楼层

回复 5# 的帖子


你可以把log_format 从server段里移出来,可能是nginx调整了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-22 03:42 , Processed in 0.026782 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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