How to Configure Nginx for Magento

Home » How to Configure Nginx for Magento

location / {
try_files $uri $uri/ /index.php?$args;
}

location /RELEASE_NOTES.txt {
return 404;
}

location /report/config.xml {
return 404;
}

location /app/ {
return 404;
}

location /includes/ {
return 404;
}

location /lib/ {
return 404;
}

location /media/downloadable/ {
return 404;
}

location /pkginfo/ {
return 404;
}

location /var/ {
return 404;
}

location /downloader/template/ {
return 404;
}

location /media/customer/ {
return 404;
}

location ~ ^/errors/.+.(xml|phtml)$ {
return 404;
}

location ~ ^/downloader/.+.(cfg|ini|xml)$ {
return 404;
}

Launch Brigade uses Accessibility Checker to monitor our website's accessibility. Read our Accessibility Policy.