Skip to content

Instantly share code, notes, and snippets.

@invmatt
Last active April 5, 2017 13:20
Show Gist options
  • Save invmatt/b303af625ac787b7f0420ec69d2fd011 to your computer and use it in GitHub Desktop.
Save invmatt/b303af625ac787b7f0420ec69d2fd011 to your computer and use it in GitHub Desktop.
Magento 2 NGINX default config
upstream fastcgi_backend {
server 127.0.0.1:9000;
}
server {
listen 80;
server_name domain.com;
set $MAGE_ROOT /usr/share/nginx/html;
set $MAGE_MODE production;
include /usr/share/nginx/html/nginx.conf.sample;
location ~ \.php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment