Skip to content

Instantly share code, notes, and snippets.

@nahidacm
Last active April 17, 2019 03:21
Show Gist options
  • Save nahidacm/7e781de7cedf1b6e4f9339bb5973706d to your computer and use it in GitHub Desktop.
Save nahidacm/7e781de7cedf1b6e4f9339bb5973706d to your computer and use it in GitHub Desktop.
Nginx server block configuration for magento 2
# Only one server block may have `upstream fastcgi_backend` block.
# So if you already defined that for some virtual host of your server do not ad that again for other hosts.
# In that case only `server` block is required.
upstream fastcgi_backend {
server unix:/run/php/php7.2-fpm.sock;
}
server {
listen 80;
listen [::]:80;
server_name magento.loc;
set $MAGE_ROOT /var/www/magento.loc;
include /var/www/magento.loc/nginx.conf.sample;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment