PHP Pages

mdm100 nginx-forum at
Wed May 23 20:32:52 UTC 2018

mdm100 Wrote:
 mdm100 Wrote:
My nginx vhost setup will serve .html files but it throws the  502
 Bad Gateway
nginx/1.12.1 (Ubuntu)

 Gateway error when trying to serve a .php file.
 This server runs Laravel vhost with not issue, it just will not run
plain .php files. 
 Server: Ubuntu 17
 server {
     listen 80;
     listen [::]:80;

    root   /var/www/html/convergeone;
     index  index.html index.php;

     location / {
         try_files $uri $uri/ =404;
     location ~ \.php$ {
             include snippets/fastcgi-php.conf;
             include fastcgi_params;
            fastcgi_pass unix:/run/php/php7.0-fpm.sock;
             fastcgi_param SCRIPT_FILENAME

Posted at Nginx Forum:,279936,279938#msg-279938

More information about the nginx mailing list