使用 Nginx Php-fpm 的白页并且没有记录错误
White page with Nginx Php-fpm and no errors logged
我有一个服务器 运行 archlinux、nginx 和 Php-fpm,当我尝试加载页面时,我得到的只是白色 page.I已尝试找到多个修复在互联网上,但 none 对我有用。
这是我的 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() ?>
任何帮助将不胜感激:)
我安装了全新的 debian 安装,现在一切正常
我有一个服务器 运行 archlinux、nginx 和 Php-fpm,当我尝试加载页面时,我得到的只是白色 page.I已尝试找到多个修复在互联网上,但 none 对我有用。
这是我的 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() ?>
任何帮助将不胜感激:)
我安装了全新的 debian 安装,现在一切正常