New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Add php7.0-fpm fast-cgi option to default nginx file. #1904

benfurfie opened this Issue Apr 28, 2018 · 0 comments


None yet
2 participants

benfurfie commented Apr 28, 2018

Expected behaviour

As more and more sites move towards using PHP 7.x over PHP 5.x, there should be a default configuration option within the supplied nginx.conf to PHP 7.0 to point to the .sock file. When the user uploads the default file and just changes the url option, they will be presented with a 502 Bad Gateway error and little other information.

It is only by digging into the logs that any indication of what is wrong can be worked out.

Actual behaviour

The only option is for PHP5's sock. While it might seem like the easiest option would be to change this from fastcgi_pass unix:/var/run/php5-fpm.sock; to fastcgi_pass unix:/var/run/php7.0-fpm.sock;, that won't work as by default, php7.x is now in the new /php folder.

Proposed Solution

Change the default nginx.conf file to have a reference to the new php7.0-fpm and location, but be commented out by default. When PHP5 is finally EOS'd, switch the commented default over.

location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment