August 2017
Intermediate to advanced
278 pages
8h 53m
English
Thankfully, Magento provides a fairly functional NGINX sample configuration (located in the root of the Magento source folder) to get started with. I've located the files within the /var/www/html directory, which will be known as MAGE_ROOT.
Magento provides a basic configuration out of the box, which only requires a few small changes. However, I prefer to use my own configuration which I find easier to follow. Here's how I do it:
server { listen 80; server_name magento.nginxcookbook.com; set $MAGE_ROOT /var/www/html; access_log /var/log/nginx/magento.access.log combined; index index.php; root $MAGE_ROOT/pub/; location / { try_files $uri $uri/ /index.php?$args; } location ~ ^/(setup|update) { root $MAGE_ROOT; location ~ ^/(setup|update)/index.php ...Read now
Unlock full access