0
info.phpを含む私のサーバにPHPファイルをロードしようとすると、404エラーが表示されます。 LEMPを16.04でインストールしましたが、私のPHPが動作しない理由を見つけるのは難しいようです。16.04のインストールでLEMPの後にPHPを動作させるには? info.phpファイルでもエラー404が発生する
私のnginxのサイトで入手可能なファイルは次のようになります。
server {
listen 80;
listen [::]:80;
server_name website.com www.website.com;
location/{
root /var/www/website.com/html;
index index.html index.htm index.php index.nginx-debian.html;
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
server {
listen 443;
ssl on;
# sslcertificate
sslcertificate /etc/nginx/certchain.crt;
# sslcertificatekey
sslcertificate_key /root/website.com.key;
server_name website.com website.com;
access_log /var/log/nginx/nginx.vhost.access.log;
error_log /var/log/nginx/nginx.vhost.error.log;
location/{
root /var/www/website.com/html;
index index.php index.html index.htm index.nginx-debian.html;
}
location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}