chaizrd 发表于 2011-7-4 14:39:59

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

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

关于这个问题我搜索了论坛的其他几个帖子,包括:
https://bbs.vpser.net/viewthread.php?tid=3116&highlight=input%2Bfile%2Bspecified
https://bbs.vpser.net/viewthread.php?tid=2931&highlight=input%2Bfile%2Bspecified
https://bbs.vpser.net/viewthread.php?tid=3116&highlight=input%2Bfile%2Bspecified
等。


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

# /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,已确认:
# ls /home/wwwroot/www.域名.com/ -l
total 376
-rwxrwxrwx1 root root 125974 Jul3 04:22 error_log
-rwxrwxrwx1 root root   1406 Jul3 04:22 favicon.ico
-rwxrwxrwx1 root root    397 Jul3 04:22 index.php
-rwxrwxrwx1 root root15606 Jul3 04:22 license.txt
-rwxrwxrwx1 root root   9200 Jul3 04:22 readme.html
-rwxrwxrwx1 root root   9730 Jul3 04:22 sitemap.xml
-rwxrwxrwx1 root root   1347 Jul3 04:22 sitemap.xml.gz
-rwxrwxrwx1 root root   4337 Jul3 04:22 wp-activate.php
drwxrwxrwx 10 root root   4096 Jul4 07:06 wp-admin
-rwxrwxrwx1 root root40283 Jul3 04:22 wp-app.php
-rwxrwxrwx1 root root    226 Jul3 04:22 wp-atom.php
-rwxrwxrwx1 root root    274 Jul3 04:22 wp-blog-header.php
-rwxrwxrwx1 root root   3931 Jul3 04:22 wp-comments-post.php
-rwxrwxrwx1 root root    244 Jul3 04:22 wp-commentsrss2.php
-rwxrwxrwx1 root root   2670 Jul4 08:04 wp-config.php
-rwxrwxrwx1 root root   3177 Jul3 04:22 wp-config-sample.php
drwxrwxrwx7 root root   4096 Jul4 07:06 wp-content
-rwxrwxrwx1 root root   1255 Jul3 04:22 wp-cron.php
-rwxrwxrwx1 root root    246 Jul3 04:22 wp-feed.php
drwxrwxrwx8 root root   4096 Jul4 07:08 wp-includes
-rwxrwxrwx1 root root   1997 Jul3 04:22 wp-links-opml.php
-rwxrwxrwx1 root root   2453 Jul3 04:22 wp-load.php
-rwxrwxrwx1 root root27787 Jul3 04:22 wp-login.php
-rwxrwxrwx1 root root   7774 Jul3 04:22 wp-mail.php
-rwxrwxrwx1 root root    494 Jul3 04:22 wp-pass.php
-rwxrwxrwx1 root root    224 Jul3 04:22 wp-rdf.php
-rwxrwxrwx1 root root    334 Jul3 04:22 wp-register.php
-rwxrwxrwx1 root root    226 Jul3 04:22 wp-rss2.php
-rwxrwxrwx1 root root    224 Jul3 04:22 wp-rss.php
-rwxrwxrwx1 root root   9655 Jul3 04:22 wp-settings.php
-rwxrwxrwx1 root root18644 Jul3 04:22 wp-signup.php
-rwxrwxrwx1 root root   3702 Jul3 04:22 wp-trackback.php
-rwxrwxrwx1 root root   3210 Jul3 04:22 xmlrpc.php
#

请问军哥,除了这两项以外,还可能是什么其他的问题导致这个发生的么?感谢解答!

chaizrd 发表于 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;
        }
}

chaizrd 发表于 2011-7-4 14:54:13

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

userwww www;

worker_processes 2;

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


                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;
}

chaizrd 发表于 2011-7-4 15:34:45

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

静候军哥解答,感谢!

licess 发表于 2011-7-5 08:44:21

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

chaizrd 发表于 2011-7-5 10:17:10

那么请问军哥的伪静态是如何设置的呢?诚心求教,非常感谢!^_^

licess 发表于 2011-7-5 10:49:20

回复 6# 的帖子

http://lnmp.org/install.html 里面添加虚拟主机的方法添加

chaizrd 发表于 2011-7-6 04:32:48

回复 7# 的帖子

军哥用的就是默认生成的 wordpress.conf,不用手动修改这个文件的内容的么?

licess 发表于 2011-7-6 07:10:10

不用
页: [1]
查看完整版本: 军哥求教,LNMP 装 WordPress 后的 No input file specified 问题