Created
September 8, 2018 15:06
-
-
Save lahmacun/ab8c62f282dae23825d85647153212c6 to your computer and use it in GitHub Desktop.
This file contains 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 dummy_site.local; | |
# MAMP DOCUMENT_ROOT !! Don't remove this line !! | |
root "/Applications/MAMP/htdocs/dummy_site.local/public"; | |
access_log /Applications/MAMP/logs/nginx_access.log; | |
error_log /Applications/MAMP/logs/nginx_error.log; | |
location / { | |
try_files $uri /index.php$is_args$args; | |
} | |
location ~ ^/index\.php(/|$) { | |
fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | |
fastcgi_param DOCUMENT_ROOT $realpath_root; | |
internal; | |
} | |
location ~ \.php$ { | |
return 404; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks @lahmacun.
With Mamp Pro 5.4 and Symfony 5.1, I had to change
fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
byfastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI_php7.2.20.sock;
include fastcgi_params
byinclude /Applications/MAMP/conf/nginx/fastcgi_params;