出现No input file specified错误
使用的是lnmp 0.8 full,运行的程序是discuzX2,使用了伪静态,用的规则是自带的discuzx.conf,日志内容页伪静态就没法打开,动态页就可以打开,其他页面伪静态都是正常的,请问怎么解决 可能是你discuz x是在二级域名,伪静态都是经过测试才放到lnmp包里的。 假设我的域名是 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 编辑 ]
回复 2# 的帖子
我绑定的是bbs.xxxx.com这样的域名,请问怎么修改让这个不出错呢 贴配置看看 这是我nginx.confuserwww www;
worker_processes 1;
error_log/home/wwwlogs/nginx_error.logcrit;
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_typeapplication/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_length1k;
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_zonecrawler$binary_remote_addr10m;
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_passunix:/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_formataccess'$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.logaccess;
}
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_passunix:/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 没看见你include discuzx.conf 原帖由 skyeysong 于 2012-3-25 13:08 发表 https://bbs.vpser.net/images/common/back.gif
没看见你include discuzx.conf
那是楼主, 我用的是wordpress, lnmp自带的那个 原帖由 rapwaydown 于 2012-3-25 13:19 发表 https://bbs.vpser.net/images/common/back.gif
那是楼主, 我用的是wordpress, lnmp自带的那个
晕……我感觉你是没有管www.breakbrunch.com 的server? 原帖由 skyeysong 于 2012-3-25 13:28 发表 https://bbs.vpser.net/images/common/back.gif
晕……我感觉你是没有管www.breakbrunch.com 的server?
那要怎么做? 原帖由 rapwaydown 于 2012-3-25 13:31 发表 https://bbs.vpser.net/images/common/back.gif
那要怎么做?
如果在 vhost里的conf加上 server_name www.breakbrunch.com; 的话
www.breakbrunch.com/phpmyadmin 和breakbrunch.com/phpmyadmin就都是'No input file specified"
回复 5# 的帖子
nginx.conf这个文件的:userwww www;
worker_processes 1;
error_log/home/wwwlogs/nginx_error.logcrit;
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_typeapplication/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_length1k;
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_zonecrawler$binary_remote_addr10m;
server
{
listen 80;
server_name loghen.com;
index index.html index.htm index.php;
root/home/wwwroot;
location ~ .*\.(php|php5)?$
{
fastcgi_passunix:/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_formataccess'$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.logaccess;
}
include vhost/*.conf;
}
vhost文件夹里面的配置:
server
{
listen 80;
server_name home.loghen.com;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/bbs;
include discuzx.conf;
location ~ .*\.(php|php5)?$
{
fastcgi_passunix:/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;
} 军哥……能不能帮忙看看~
回复 11# 的帖子
phpmyadmin不在/home/wwwroot/bb吧,所以会出错回复 14# 的帖子
我phpmyadmin放在/home/wwwroot 里面的
页:
[1]
2