Created
August 16, 2018 15:37
-
-
Save aric49/f0cc28c862a68c67c595ae8579f3a579 to your computer and use it in GitHub Desktop.
NGINX FastCGI Debugging
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
| <?php | |
| //print out values of variables | |
| var_dump($_SERVER[‘REMOTE_ADDR’]); | |
| var_dump($_SERVER[‘HTTP_X_FORWARDED_FOR’]); | |
| ?> |
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
| location ~ ^(.+\.php)(.*)$ { | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| fastcgi_intercept_errors on; | |
| fastcgi_pass mysite-web-php:9000; | |
| fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
| include fastcgi.conf; | |
| fastcgi_param REMOTE_ADDR $remote_addr; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| fastcgi_param HTTPS on; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment