美好的一天。
虽然这篇文章讨论了类似的设置,以使我在成功安装后偶尔提供空白页,但是我只能提供空白页。有没有存在的错误/var/log/nginx/error.log
,/var/log/php-fpm.log
或/var/log/nginx/us/sharonrhodes/blog/error.log
。
我的设置:
- WordPress的3.0.4
- nginx 0.8.54
- php-fpm 5.3.5(fpm-fcgi)
- Arch Linux
配置文件
php-fpm.conf:
[全球] pid =运行/ php-fpm / php-fpm.pid error_log =日志/php-fpm.log log_level =通知 [万维网] 听= 127.0.0.1:9000 listen.owner = www listen.group = www listen.mode = 0660 用户= www 组= www pm =动态 pm.max_children = 50 pm.start_servers = 20 pm.min_spare_servers = 5 pm.max_spare_servers = 35 pm.max_requests = 500
nginx.conf:
用户www; worker_processes 1; error_log /var/log/nginx/error.log通知; pid /var/run/nginx.pid; 事件{ worker_connections 1024; } http { 包括mime.types; default_type应用程序/八位字节流; 发送文件; keepalive_timeout 65; gzip on; 包括/etc/nginx/sites-enabled/*.conf; }
/etc/nginx/sites-enabled/blog_sharonrhodes_us.conf:
上游php { 服务器127.0.0.1:9000; } 服务器{ error_log /var/log/nginx/us/sharonrhodes/blog/error.log通知; access_log /var/log/nginx/us/sharonrhodes/blog/access.log; server_name blog.sharonrhodes.us; 根/ srv / apps / us / sharonrhodes / blog; 索引index.php; 位置= /favicon.ico { log_not_found关闭; access_log关闭; } 位置= /robots.txt { 允许所有; log_not_found关闭; access_log关闭; } 位置 / { #这很酷,因为静态内容没有涉及php try_files $ uri $ uri / /index.php?q=$uri&$args; } 位置〜\ .php $ { fastcgi_split_path_info ^(。+ \。php)(/.+)$; #注意:您应该具有“ cgi.fix_pathinfo = 0;”。在php.ini中 包括fastcgi_params; fastcgi_intercept_errors开启; fastcgi_pass php; } 位置〜* \。(js | css | png | jpg | jpeg | gif | ico)$ { 最多到期; log_not_found关闭; } }
/etc/nginx/conf/fastcgi.conf:
fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name; fastcgi_param QUERY_STRING $ query_string; fastcgi_param REQUEST_METHOD $ request_method; fastcgi_param CONTENT_TYPE $ content_type; fastcgi_param CONTENT_LENGTH $ content_length; fastcgi_param SCRIPT_NAME $ fastcgi_script_name; fastcgi_param REQUEST_URI $ request_uri; fastcgi_param DOCUMENT_URI $ document_uri; fastcgi_param DOCUMENT_ROOT $ document_root; fastcgi_param SERVER_PROTOCOL $ server_protocol; fastcgi_param GATEWAY_INTERFACE CGI / 1.1; fastcgi_param SERVER_SOFTWARE nginx / $ nginx_version; fastcgi_param REMOTE_ADDR $ remote_addr; fastcgi_param REMOTE_PORT $ remote_port; fastcgi_param SERVER_ADDR $ server_addr; fastcgi_param SERVER_PORT $ server_port; fastcgi_param SERVER_NAME $ server_name; #仅PHP,如果PHP是使用--enable-force-cgi-redirect构建的,则为必需 fastcgi_param REDIRECT_STATUS 200;
空白页通常表示存在致命错误。查看您的error_log以获取更多信息
—
迈克
我应该说过这一点,但是/var/log/nginx/error.log、/var/log/php-fpm.log或/ var / log / nginx / us / sharonrhodes / blog / error中没有错误。日志。
—
troutwine