Created
June 24, 2022 20:09
-
-
Save Sirpyerre/c00f32d67a058661293e2a90332d44d4 to your computer and use it in GitHub Desktop.
nginx config for mezzio php micro framework
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 { | |
server_name app-dsp.local; | |
root /var/www/html/app-dsp/public; | |
location / { | |
try_files $uri index.php @mezzio; | |
} | |
location @mezzio { | |
rewrite /(.*)$ /index.php?/$1 last; | |
} | |
location ~ \.php { | |
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
include snippets/fastcgi-php.conf; | |
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | |
fastcgi_param DOCUMENT_ROOT $realpath_root; | |
internal; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment