Skip to content

Instantly share code, notes, and snippets.

@gansbrest
Created December 7, 2016 02:17
Show Gist options
  • Save gansbrest/85d3b814c4e662fcf3610143af43cb23 to your computer and use it in GitHub Desktop.
Save gansbrest/85d3b814c4e662fcf3610143af43cb23 to your computer and use it in GitHub Desktop.
nginx config for smyfony 3 docker
server {
listen 80 default_server; # redundant in new nginx versions
server_name _;
#index index.php index.html index.htm;
root /usr/share/nginx/html/web;
# Block access to "hidden" files and directories whose names begin with a
# period. This includes directories used by version control systems such
# as Subversion or Git to store control files.
location ~ (^|/)\. {
return 403;
}
location / {
try_files $uri /app_dev.php$is_args$args;
}
location ~ \.php {
#location ~ ^/(app_dev|config)\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass app:9000;
fastcgi_intercept_errors on;
# fastcgi_index index.php;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment