Что не так с конфигом?
Прив!
index.html читает, index.php — нет. Ниже конфиг sites-available. Nginx.conf не трогал.
Права норм. php5-fpm стоит.
Что не так?
server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; return 301 https://$server_name$request_uri; root /var/www/html; index index.php index.html; # Make site accessible from localhost/ server_name localhost; location / { try_files $uri $uri/ =404; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /var/www/html; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # root html; # index index.html index.htm; # # location / { # try_files $uri $uri/ =404; # } #} server { listen 443 ssl spdy; ssl on; ssl_certificate /etc/nginx/ssl/bundle.crt; ssl_certificate_key /etc/nginx/ssl/main.key; # side note: only use TLS since SSLv2 and SSLv3 have had recent vulnerabilities ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #… }
index.html читает, index.php — нет. Ниже конфиг sites-available. Nginx.conf не трогал.
Права норм. php5-fpm стоит.
Что не так?
server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; return 301 https://$server_name$request_uri; root /var/www/html; index index.php index.html; # Make site accessible from localhost/ server_name localhost; location / { try_files $uri $uri/ =404; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /var/www/html; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # root html; # index index.html index.htm; # # location / { # try_files $uri $uri/ =404; # } #} server { listen 443 ssl spdy; ssl on; ssl_certificate /etc/nginx/ssl/bundle.crt; ssl_certificate_key /etc/nginx/ssl/main.key; # side note: only use TLS since SSLv2 and SSLv3 have had recent vulnerabilities ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #… }