Skip to content

Instantly share code, notes, and snippets.

@ger86
Created February 4, 2020 15:08
Show Gist options
  • Save ger86/d8fddb60507ccf26faf8b008c035dddb to your computer and use it in GitHub Desktop.
Save ger86/d8fddb60507ccf26faf8b008c035dddb to your computer and use it in GitHub Desktop.
default.conf for Dockerfile-nginx
server {
listen 80;
root /var/www/rocket/public;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
# Connect to the Docker service using fpm
fastcgi_pass php:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
internal;
}
location ~ \.php$ {
return 404;
}
error_log /dev/stdout info;
access_log /var/log/nginx/project_access.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment