Last active
February 20, 2019 10:23
-
-
Save jmsfwk/f70a747f1b201f6a2ebe76a68512454e to your computer and use it in GitHub Desktop.
Nginx conf for an app in different places in different containers
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
| server { | |
| listen 80; | |
| location / { | |
| root /usr/share/nginx/html; | |
| index index.php index.html index.htm; | |
| try_files $uri $uri/ /index.php?$query_string; | |
| } | |
| # pass the PHP scripts to FastCGI server listening on php:9000 | |
| # | |
| location ~ \.php$ { | |
| root /usr/src/app/public; | |
| fastcgi_pass php:9000; | |
| include fastcgi_params; | |
| fastcgi_index index.php; | |
| fastcgi_param SCRIPT_FILENAME $request_filename; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment