Skip to content

Instantly share code, notes, and snippets.

@jmsfwk
Last active February 20, 2019 10:23
Show Gist options
  • Select an option

  • Save jmsfwk/f70a747f1b201f6a2ebe76a68512454e to your computer and use it in GitHub Desktop.

Select an option

Save jmsfwk/f70a747f1b201f6a2ebe76a68512454e to your computer and use it in GitHub Desktop.
Nginx conf for an app in different places in different containers
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