Update /etc/nginx/sites-enabled/default with php-fpm 7.2

Bug #1831748 reported by FreeTechCenter on 2019-06-05
This bug affects 5 people
Affects Status Importance Assigned to Milestone
nginx (Ubuntu)
Thomas Ward

Bug Description

After install Nginx creates a file called /etc/nginx/sites-enabled/default which is a link to /etc/nginx/sites-available/default

A line inside is commented for use in PHP-FPM (7.0):

 #location ~ \.php$ {
        # include snippets/fastcgi-php.conf;
        # # With php-fpm (or other unix sockets):
        # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        # # With php-cgi (or other tcp sockets):
        # fastcgi_pass;

The php-fpm line should read:
# fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;

as Ubuntu 18.04 uses PHP 7.2 not Debians PHP 7.0

A simple problem but a confusion I've noticed come up more than once.

Description: Ubuntu 18.04.2 LTS
Release: 18.04

Installed: 1.14.0-0ubuntu1.2
  Candidate: 1.14.0-0ubuntu1.2
  Version table:
 *** 1.14.0-0ubuntu1.2 500
        500 http://mirrors.digitalocean.com/ubuntu bionic-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        100 /var/lib/dpkg/status
     1.14.0-0ubuntu1 500
        500 http://mirrors.digitalocean.com/ubuntu bionic/main amd64 Packages

FreeTechCenter (freetechcenter) wrote :

The attachment "Patch file" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Paride Legovini (paride) on 2019-06-06
Changed in nginx (Ubuntu):
milestone: none → ubuntu-19.10
Paride Legovini (paride) wrote :

Thank you for taking the time to file this bug report and helping to make Ubuntu better. Your report is valid, however this issue alone does not justify a Stable Release Update (SRU), the procedure to fix bugs in existing Ubuntu releases. The SRU procedure and policy is documented here:


However there is no reason to keep things as they are in future releases, so I targeted this bug to Ubuntu 19.10. As it is highly probable for that comment to get out of sync again with the default version of php (the two packages are updated independently), a comment should be added asking the user to adapt the php version to match the currently installed version.

Changed in nginx (Ubuntu Xenial):
status: New → Won't Fix
Changed in nginx (Ubuntu Bionic):
status: New → Won't Fix
Changed in nginx (Ubuntu Cosmic):
status: New → Won't Fix
Changed in nginx (Ubuntu Disco):
status: New → Won't Fix
Changed in nginx (Ubuntu):
status: New → Triaged
tags: added: server-next
removed: fpm php
Paride Legovini (paride) on 2019-06-06
Changed in nginx (Ubuntu):
importance: Undecided → Low
Thomas Ward (teward) on 2019-06-06
Changed in nginx (Ubuntu):
assignee: nobody → Thomas Ward (teward)
Thomas Ward (teward) wrote :

This configuration that is referred to in the duplicate now linked here is a Debian and Ubuntu specific configuration option in the **example** default config. While it may not match with the CURRENT PHP paths it is designed as an example rather than a "quickly enable this feature" mechanism. This issue is specific to the NGINX configuration in Debian and Ubuntu and should only be tracked on those relevant bug trackers and not the NGINX upstream project (as I indicated on the nginx-devel list last week).

Changed in nginx:
importance: Undecided → Low
status: New → Won't Fix
status: Won't Fix → Invalid
importance: Low → Undecided
Thomas Ward (teward) wrote :

I will prepare a change in Eoan for this in the future however this also needs upstreamed to Debian as well for them to do a similar comment in theirs. Debian is currently frozen however so it is unlikely to see a fix there until after freeze.

Thomas Ward (teward) on 2019-08-15
Changed in nginx (Ubuntu):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nginx - 1.16.1-0ubuntu2

nginx (1.16.1-0ubuntu2) eoan; urgency=medium

  * d/conf/sites-available/default: Update PHP referred to in the
    example in the default configuration to PHP 7.2.
    (LP: #1831748)

 -- Thomas Ward <email address hidden> Thu, 15 Aug 2019 12:01:39 -0400

Changed in nginx (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers