Skip to content

Restore backward-compatible nginx config files for PHP images#2936

Merged
Saipriya-1144 merged 3 commits into
mainfrom
user/vchintalapat/nginx-migration-backward-compat
Jun 22, 2026
Merged

Restore backward-compatible nginx config files for PHP images#2936
Saipriya-1144 merged 3 commits into
mainfrom
user/vchintalapat/nginx-migration-backward-compat

Conversation

@Saipriya-1144

@Saipriya-1144 Saipriya-1144 commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

The official nginx.org package ships minimal config compared to the sury.org nginx package. Customers using custom nginx configs that reference files from the old image would experience hard crashes (nginx: [emerg] ... No such file or directory), causing their sites to go completely down.

Changes

Fix: sites-enabled symlink

  • Replaced duplicate COPY default.conf with proper ln -s symlink (sites-enabled → sites-available)

Patch: mime.types and fastcgi_params

  • Added missing video/ogg ogv and video/x-matroska mkv to mime.types
  • Added missing fastcgi_param REMOTE_USER $remote_user to fastcgi_params

Restore: Missing config files

  • fastcgi.conf — used by include fastcgi.conf; (differs from fastcgi_params by including SCRIPT_FILENAME)
  • proxy_params — used by include proxy_params; in reverse proxy setups
  • snippets/fastcgi-php.conf — standard PHP snippet referenced in many tutorials

Restore: Empty directories

  • modules-enabled/ — prevents crash if customer config has include /etc/nginx/modules-enabled/*.conf;

  • modules-available/ — existed in old image (was empty)

  • The purpose of this PR is explained in this message or in an issue. If an issue please include a reference as #<issue_number>.

  • Tests are included and/or updated for code changes.

  • Proper license headers are included in each file.

@Saipriya-1144 Saipriya-1144 requested a review from a team as a code owner June 17, 2026 21:14

@ShilpiRach ShilpiRach left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@Saipriya-1144 Saipriya-1144 merged commit 2668814 into main Jun 22, 2026
9 checks passed
@Saipriya-1144 Saipriya-1144 deleted the user/vchintalapat/nginx-migration-backward-compat branch June 22, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants