Skip to content

Instantly share code, notes, and snippets.

@Sirpyerre
Created June 24, 2022 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sirpyerre/c00f32d67a058661293e2a90332d44d4 to your computer and use it in GitHub Desktop.
Save Sirpyerre/c00f32d67a058661293e2a90332d44d4 to your computer and use it in GitHub Desktop.
nginx config for mezzio php micro framework
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