Skip to content

Instantly share code, notes, and snippets.

@marlonramirez
Last active December 31, 2015 12:12
Show Gist options
  • Save marlonramirez/954cd892ec2c67ed50a0 to your computer and use it in GitHub Desktop.
Save marlonramirez/954cd892ec2c67ed50a0 to your computer and use it in GitHub Desktop.
Configuración de NGINX para SCOOP
merge_slashes off;
rewrite (.*)//+(.*) $1/$2 permanent;
location /scoop {
root html;
index index.html index.htm index.php;
try_files $uri $uri/ /scoop/?$args @rw-scoop;
expires max;
}
location @rw-scoop {
rewrite ^/scoop/(.*)(/?)$ /scoop/index.php?route=$1&$args? last;
}
if ($host ~* ^www\.(.*)) {
set $host_without_www $1;
rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent;
}
location ~ ^([^.\?]*[^/])$ {
try_files $uri @addslash;
}
location @addslash {
return 301 $uri/;
}
location scoop/(app|vendor|scoop|resources)/ {
deny all;
}
location ~ \.(htaccess|htpasswd|ini|log|bak)$ {
deny all;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment