【发布时间】:2015-09-23 06:19:28
【问题描述】:
我有一个运行 archlinux、nginx 和 Php-fpm 的服务器,当我尝试加载页面时,我得到的只是一个白页。我尝试了在互联网上找到的多个修复程序,但没有一个对我有用。
这是我的 nginx 配置文件:
server {
listen 80;
root /home/www-data/websites/subdomain.domain.net;
index index.php index.html index.htm;
server_name subdomain.domain.net;
access_log /root/logs/nginx/subdomain.access.log;
error_log /root/logs/nginx/subdomain.error.log;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* \ (gif|jpg|png) {
expires 30d;
}
location ~ ^/favicons/.*$ {
try_files $uri /data/$uri;
}
location / {
index index.php index.html index.htm;
try_files $uri /public/$uri /index.php$is_args$args;
}
}
nginx和subdomain.error.log的错误日志都是空的。
该文件位于 /home/www-data/websites/subdomain.domain.net/index.php 并包含以下内容:
<?php phpinfo() ?>
任何帮助将不胜感激:)
【问题讨论】: