Last active
February 21, 2025 06:33
-
-
Save gibrandev/18772948ce6d3744c4a00f528ab70756 to your computer and use it in GitHub Desktop.
Nginx http minimal config for php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /usr/share/nginx/html; | |
| index index.php index.html index.htm; | |
| location / { | |
| try_files $uri $uri/ /index.php?$query_string; | |
| } | |
| location ~ \.php$ { | |
| fastcgi_pass unix:/run/php/php8.2-fpm.sock; | |
| fastcgi_index index.php; | |
| fastcgi_buffers 8 16k; | |
| fastcgi_buffer_size 32k; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| include fastcgi_params; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment