Created
July 5, 2018 00:27
-
-
Save marzsv/738e003e12d688ce2fab4f35faa13027 to your computer and use it in GitHub Desktop.
Passing environment variables from Nginx to PHP-FPM
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 8000; | |
server_name mysite.local; | |
root /Users/mario/Code/mysite; | |
location ~ \.php(/|$) { | |
include fastcgi_params; | |
fastcgi_pass unix:/Users/mario/.phpbrew/php/php-5.6.31/var/run/php-fpm.sock; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param HTTPS off; | |
# Custom environment variable | |
fastcgi_param DEBUG true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment