Skip to content

Instantly share code, notes, and snippets.

@dfelton
Created July 13, 2016 18:02
Show Gist options
  • Select an option

  • Save dfelton/e5fe7fdf380da16fd1198c151910e378 to your computer and use it in GitHub Desktop.

Select an option

Save dfelton/e5fe7fdf380da16fd1198c151910e378 to your computer and use it in GitHub Desktop.
nginx configurations for Magento store.
############################################
## Disallow PHP scripts in /media/ and /js/
location ^~ /media/ {
location ~ \.php$ {
return 403;
}
try_files $uri $uri/ =404;
expires 30d;
}
location ^~ /js/ {
location ~ \.php$ {
return 403;
}
try_files $uri $uri/ =404;
expires 30d;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment