VPS侦探论坛

 找回密码
 注册
查看: 10778|回复: 8

军哥求教,LNMP 装 WordPress 后的 No input file specified 问题

[复制链接]
发表于 2011-7-4 14:39:59 | 显示全部楼层 |阅读模式

你好军哥,我是 CENTOS 5.6 FINAL 64 位系统,LNMP 安装过程中一切正常,现在的情况是只有主页能显示,其余所有的超链接点开全部都是 NO INPUT FILE SPECIFIED。

关于这个问题我搜索了论坛的其他几个帖子,包括:
https://bbs.vpser.net/viewthread ... %2Bfile%2Bspecified
https://bbs.vpser.net/viewthread ... %2Bfile%2Bspecified
https://bbs.vpser.net/viewthread ... %2Bfile%2Bspecified
等。


运行 /usr/local/nginx/sbin/nginx -t 测试通过,结果正常

[root@server ~]# /usr/local/nginx/sbin/nginx -t
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful

目录权限,皆为 777,已确认:
[root@server ~]# ls /home/wwwroot/www.域名.com/ -l
total 376
-rwxrwxrwx  1 root root 125974 Jul  3 04:22 error_log
-rwxrwxrwx  1 root root   1406 Jul  3 04:22 favicon.ico
-rwxrwxrwx  1 root root    397 Jul  3 04:22 index.php
-rwxrwxrwx  1 root root  15606 Jul  3 04:22 license.txt
-rwxrwxrwx  1 root root   9200 Jul  3 04:22 readme.html
-rwxrwxrwx  1 root root   9730 Jul  3 04:22 sitemap.xml
-rwxrwxrwx  1 root root   1347 Jul  3 04:22 sitemap.xml.gz
-rwxrwxrwx  1 root root   4337 Jul  3 04:22 wp-activate.php
drwxrwxrwx 10 root root   4096 Jul  4 07:06 wp-admin
-rwxrwxrwx  1 root root  40283 Jul  3 04:22 wp-app.php
-rwxrwxrwx  1 root root    226 Jul  3 04:22 wp-atom.php
-rwxrwxrwx  1 root root    274 Jul  3 04:22 wp-blog-header.php
-rwxrwxrwx  1 root root   3931 Jul  3 04:22 wp-comments-post.php
-rwxrwxrwx  1 root root    244 Jul  3 04:22 wp-commentsrss2.php
-rwxrwxrwx  1 root root   2670 Jul  4 08:04 wp-config.php
-rwxrwxrwx  1 root root   3177 Jul  3 04:22 wp-config-sample.php
drwxrwxrwx  7 root root   4096 Jul  4 07:06 wp-content
-rwxrwxrwx  1 root root   1255 Jul  3 04:22 wp-cron.php
-rwxrwxrwx  1 root root    246 Jul  3 04:22 wp-feed.php
drwxrwxrwx  8 root root   4096 Jul  4 07:08 wp-includes
-rwxrwxrwx  1 root root   1997 Jul  3 04:22 wp-links-opml.php
-rwxrwxrwx  1 root root   2453 Jul  3 04:22 wp-load.php
-rwxrwxrwx  1 root root  27787 Jul  3 04:22 wp-login.php
-rwxrwxrwx  1 root root   7774 Jul  3 04:22 wp-mail.php
-rwxrwxrwx  1 root root    494 Jul  3 04:22 wp-pass.php
-rwxrwxrwx  1 root root    224 Jul  3 04:22 wp-rdf.php
-rwxrwxrwx  1 root root    334 Jul  3 04:22 wp-register.php
-rwxrwxrwx  1 root root    226 Jul  3 04:22 wp-rss2.php
-rwxrwxrwx  1 root root    224 Jul  3 04:22 wp-rss.php
-rwxrwxrwx  1 root root   9655 Jul  3 04:22 wp-settings.php
-rwxrwxrwx  1 root root  18644 Jul  3 04:22 wp-signup.php
-rwxrwxrwx  1 root root   3702 Jul  3 04:22 wp-trackback.php
-rwxrwxrwx  1 root root   3210 Jul  3 04:22 xmlrpc.php
[root@server ~]#

请问军哥,除了这两项以外,还可能是什么其他的问题导致这个发生的么?感谢解答!
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-7-4 14:52:30 | 显示全部楼层

附上 wordpress.conf 内容



location / {
        # if the requested file exists, return it immediately
        if (-f $request_filename) {
                break;
        }
         
        set $supercache_file '';
        set $supercache_uri $request_uri;
         
        if ($request_method = POST) {
                set $supercache_uri '';
        }
         
        # Using pretty permalinks, so bypass the cache for any query string
        if ($query_string) {
                set $supercache_uri '';
        }
         
        if ($http_cookie ~* "comment_author_|wp-postpass_" ) {
                set $supercache_uri '';
        }
         
        # if we haven't bypassed the cache, specify our supercache file
        if ($supercache_uri ~ ^(.+)$) {
                set $supercache_file /wp-content/cache/supercache/$http_host/$1index.html;
        }
         
        # only rewrite to the supercache file if it actually exists
        if (-f $document_root$supercache_file) {
                rewrite ^(.*)$ $supercache_file break;
        }
         
        # all other requests go to WordPress
        if (!-e $request_filename) {
                rewrite . /index.php last;
        }
}
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-7-4 14:54:13 | 显示全部楼层

这是我的 nginx.conf,基本没什么大改,include 了 wordpress.conf


user  www www;

worker_processes 2;

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 abc.com;
                index index.html index.htm index.php;
                root  /home/wwwroot;
                include /usr/local/nginx/conf/wordpress.conf;


                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;
}
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-7-4 15:34:45 | 显示全部楼层



还有就是 WORDPRESS 的后台是完全能运作的,就是前端的所有页面内容打开都是 No input file specified。

静候军哥解答,感谢!
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-7-5 08:44:21 | 显示全部楼层

应该是伪静态的问题吧,我一直用wordpress.conf的没出过问题。

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

 楼主| 发表于 2011-7-5 10:17:10 | 显示全部楼层

那么请问军哥的伪静态是如何设置的呢?诚心求教,非常感谢!^_^
发表于 2011-7-5 10:49:20 | 显示全部楼层

回复 6# 的帖子


http://lnmp.org/install.html 里面添加虚拟主机的方法添加
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-7-6 04:32:48 | 显示全部楼层

回复 7# 的帖子


军哥用的就是默认生成的 wordpress.conf,不用手动修改这个文件的内容的么?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-7-6 07:10:10 | 显示全部楼层

不用
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-20 21:30 , Processed in 0.028722 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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