server { listen 80; # this path MUST be exactly the same as your path in FPM even if it doesn't # exist here. Nginx will send the full path of the file to render to fpm. root ${NGINX_ROOT}; gzip on; gzip_disable "msie6"; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; location / { try_files $uri /index.php$is_args$args; } client_max_body_size 2m; location ~ ^/.+\.php(/|$) { fastcgi_pass ${NGINX_FPM_HOST}:${NGINX_FPM_PORT}; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }