Skip to content

[Issue] fix: use version-agnostic PHP-FPM socket path in nginx config example #40776

@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #40678: fix: use version-agnostic PHP-FPM socket path in nginx config example


Description

Update the example PHP-FPM socket path in nginx.conf.sample to use a version-agnostic path instead of a hardcoded PHP 7.4 reference.

Problem

The example upstream configuration references php7.4-fpm.sock:

server   unix:/var/run/php/php7.4-fpm.sock;

PHP 7.4 reached end-of-life in November 2022. Magento 2.4.7+ requires PHP 8.2 or 8.3. New users following this example will get a misleading path that doesn't match their PHP installation.

Solution

Change the socket path to the version-agnostic php-fpm.sock:

server   unix:/var/run/php/php-fpm.sock;

This is the default socket path on Debian/Ubuntu when only one PHP version is installed, and avoids needing to update the example every time the minimum PHP version changes.

Files Changed

  • nginx.conf.sample

⭐ Support my work

Do you like the fix? Remember to react with "👍🏻" to get it merged faster,
Then Sponsor me on Github so I can spend more time on fixing issues like this one.

Learn more at https://github.com/sponsors/lbajsarowicz

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: ready for confirmationReported on 2.4.xIndicates original Magento version for the Issue report.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    Status

    Ready for Confirmation

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions