Last active
July 16, 2018 06:47
-
-
Save fhuitelec/67df3a5718dc03064f91d0154cde24d2 to your computer and use it in GitHub Desktop.
Medium article - PHP-FPM/NGINX one build artifact - bad conf
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 { | |
server_name domain.tld www.domain.tld; | |
root /var/www/project/public; | |
location / { | |
try_files $uri /index.php$is_args$args; | |
} | |
location ~ ^/index\.php(/|$) { | |
fastcgi_pass php-fpm:9000; # application being the DNS to reach the php-fpm upstream | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
include fastcgi_params; | |
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