VPS侦探论坛

 找回密码
 注册
查看: 13408|回复: 16

出现No input file specified错误

[复制链接]
发表于 2012-3-25 01:33:48 | 显示全部楼层 |阅读模式

使用的是lnmp 0.8 full,运行的程序是discuzX2,使用了伪静态,用的规则是自带的discuzx.conf,日志内容页伪静态就没法打开,动态页就可以打开,其他页面伪静态都是正常的,请问怎么解决
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-3-25 08:36:45 | 显示全部楼层


可能是你discuz x是在二级域名,伪静态都是经过测试才放到lnmp包里的。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2012-3-25 09:05:44 | 显示全部楼层

假设我的域名是 www.example.com

我链接phpmyadmin的时候, 也是“No input file specified.” error我就用了 Nginx下把no-www转向到www的重写规则:

if ($http_host != www.example.com) {

rewrite  (.*)  http://www.example.com$1 permanent;

}


如果不用上面的重写规则, www.example.com/phpmyadmin就可以用, example.com/phpmyadmin的话, 就是"No input file specified"
我是按照教程安装的lnmp, 也就是使用一个二级域名(www.media.example.com),绑定到/home/wwwroot/, 然后/root/vhost.sh, 输入正真的域名(www.example.com),绑定到/home/wwwroot/bb

[ 本帖最后由 rapwaydown 于 2012-3-25 10:21 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-3-25 09:48:37 | 显示全部楼层

回复 2# 的帖子




我绑定的是bbs.xxxx.com这样的域名,请问怎么修改让这个不出错呢
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2012-3-25 11:07:04 | 显示全部楼层

贴配置看看

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

发表于 2012-3-25 12:13:16 | 显示全部楼层

这是我nginx.conf
user  www www;

worker_processes 1;

error_log  /home/wwwlogs/nginx_error.log  crit;

pid        /usr/local/nginx/logs/nginx.pid;

#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;

events

{

use epoll;

worker_connections 51200;

}

http

{

include       mime.types;

default_type  application/octet-stream;


server_names_hash_bucket_size 128;

client_header_buffer_size 32k;

large_client_header_buffers 4 32k;

client_max_body_size 50m;


sendfile on;

tcp_nopush     on;


keepalive_timeout 60;


tcp_nodelay on;


fastcgi_connect_timeout 300;

fastcgi_send_timeout 300;

fastcgi_read_timeout 300;

fastcgi_buffer_size 64k;

fastcgi_buffers 4 64k;

fastcgi_busy_buffers_size 128k;

fastcgi_temp_file_write_size 256k;


gzip on;

gzip_min_length  1k;

gzip_buffers     4 16k;

gzip_http_version 1.0;

gzip_comp_level 2;

gzip_types       text/plain application/x-javascript text/css application/xml;

gzip_vary on;


#limit_zone  crawler  $binary_remote_addr  10m;

server

{

listen       80;

server_name www.media.breakbrunch.com;

index index.html index.htm index.php;

root  /home/wwwroot;


if ($http_host != www.breakbrunch.com) {

rewrite  (.*)  http://www.breakrunch.com$1 permanent;

}


location ~ .*\.(php|php5)?$

{

fastcgi_pass  unix:/tmp/php-cgi.sock;

fastcgi_index index.php;

include fcgi.conf;

}


location /status {

stub_status on;

access_log   off;

}


location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$

{

expires      30d;

}


location ~ .*\.(js|css)?$

{

expires      12h;

}


log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
             '$status $body_bytes_sent "$http_referer" '
             '"$http_user_agent" $http_x_forwarded_for';

access_log  /home/wwwlogs/access.log  access;

}
include vhost/*.conf;
}


下面的是我 vhost里的conf, 也就是真正的网址

server

{

listen       80;

server_name breakbrunch.com;

index index.html index.htm index.php default.html default.htm default.php;

root  /home/wwwroot/bb;


include wordpress.conf;

location ~ .*\.(php|php5)?$

{

fastcgi_pass  unix:/tmp/php-cgi.sock;

fastcgi_index index.php;

include fcgi.conf;

}


location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$

{

expires      30d;

}


location ~ .*\.(js|css)?$

{

expires      12h;

}


access_log off;

}


phpmyadmin 目录:home/wwwroot/phpmyadmin
真正网站的目录:home/wwwroot/bb
发表于 2012-3-25 13:08:29 | 显示全部楼层

没看见你include discuzx.conf
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-3-25 13:19:47 | 显示全部楼层

原帖由 skyeysong 于 2012-3-25 13:08 发表
没看见你include discuzx.conf

那是楼主, 我用的是wordpress, lnmp自带的那个
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2012-3-25 13:28:20 | 显示全部楼层

原帖由 rapwaydown 于 2012-3-25 13:19 发表

那是楼主, 我用的是wordpress, lnmp自带的那个

晕……我感觉你是没有管www.breakbrunch.com 的server?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-3-25 13:31:17 | 显示全部楼层



原帖由 skyeysong 于 2012-3-25 13:28 发表

晕……我感觉你是没有管www.breakbrunch.com 的server?

那要怎么做?
发表于 2012-3-25 13:36:14 | 显示全部楼层

原帖由 rapwaydown 于 2012-3-25 13:31 发表

那要怎么做?

如果在 vhost里的conf加上 server_name www.breakbrunch.com; 的话
www.breakbrunch.com/phpmyadmin 和breakbrunch.com/phpmyadmin就都是'No input file specified"
 楼主| 发表于 2012-3-25 14:01:28 | 显示全部楼层

回复 5# 的帖子


nginx.conf这个文件的:
  1. user  www www;

  2. worker_processes 1;

  3. error_log  /home/wwwlogs/nginx_error.log  crit;

  4. pid        /usr/local/nginx/logs/nginx.pid;

  5. #Specifies the value for maximum file descriptors that can be opened by this process.
  6. worker_rlimit_nofile 51200;

  7. events
  8.         {
  9.                 use epoll;
  10.                 worker_connections 51200;
  11.         }

  12. http
  13.         {
  14.                 include       mime.types;
  15.                 default_type  application/octet-stream;

  16.                 server_names_hash_bucket_size 128;
  17.                 client_header_buffer_size 32k;
  18.                 large_client_header_buffers 4 32k;
  19.                 client_max_body_size 50m;

  20.                 sendfile on;
  21.                 tcp_nopush     on;

  22.                 keepalive_timeout 60;

  23.                 tcp_nodelay on;

  24.                 fastcgi_connect_timeout 300;
  25.                 fastcgi_send_timeout 300;
  26.                 fastcgi_read_timeout 300;
  27.                 fastcgi_buffer_size 64k;
  28.                 fastcgi_buffers 4 64k;
  29.                 fastcgi_busy_buffers_size 128k;
  30.                 fastcgi_temp_file_write_size 256k;

  31.                 gzip on;
  32.                 gzip_min_length  1k;
  33.                 gzip_buffers     4 16k;
  34.                 gzip_http_version 1.0;
  35.                 gzip_comp_level 2;
  36.                 gzip_types       text/plain application/x-javascript text/css application/xml;
  37.                 gzip_vary on;

  38.                 #limit_zone  crawler  $binary_remote_addr  10m;

  39. server
  40.         {
  41.                 listen       80;
  42.                 server_name loghen.com;
  43.                 index index.html index.htm index.php;
  44.                 root  /home/wwwroot;
  45.                 location ~ .*\.(php|php5)?$
  46.                         {
  47.                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  48.                                 fastcgi_index index.php;
  49.                                 include fcgi.conf;
  50.                         }

  51.                 location /status {
  52.                         stub_status on;
  53.                         access_log   off;
  54.                 }

  55.                 location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  56.                         {
  57.                                 expires      30d;
  58.                         }

  59.                 location ~ .*\.(js|css)?$
  60.                         {
  61.                                 expires      12h;
  62.                         }

  63.                 log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
  64.              '$status $body_bytes_sent "$http_referer" '
  65.              '"$http_user_agent" $http_x_forwarded_for';
  66.                 access_log  /home/wwwlogs/access.log  access;
  67.         }
  68. include vhost/*.conf;
  69. }
复制代码


vhost文件夹里面的配置:
  1. server
  2.         {
  3.                 listen       80;
  4.                 server_name home.loghen.com;
  5.                 index index.html index.htm index.php default.html default.htm default.php;
  6.                 root  /home/wwwroot/bbs;

  7.                 include discuzx.conf;
  8.                 location ~ .*\.(php|php5)?$
  9.                         {
  10.                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  11.                                 fastcgi_index index.php;
  12.                                 include fcgi.conf;
  13.                         }

  14.                 location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  15.                         {
  16.                                 expires      30d;
  17.                         }

  18.                 location ~ .*\.(js|css)?$
  19.                         {
  20.                                 expires      12h;
  21.                         }

  22.                 access_log off;
  23.         }
复制代码
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-3-25 22:53:03 | 显示全部楼层
军哥……能不能帮忙看看~
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-3-26 00:23:16 | 显示全部楼层

回复 11# 的帖子

phpmyadmin不在/home/wwwroot/bb吧,所以会出错

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

 楼主| 发表于 2012-3-26 08:05:12 | 显示全部楼层

回复 14# 的帖子

我phpmyadmin放在/home/wwwroot 里面的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-22 15:37 , Processed in 0.031030 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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