Last active
December 31, 2015 12:12
-
-
Save marlonramirez/954cd892ec2c67ed50a0 to your computer and use it in GitHub Desktop.
Configuración de NGINX para SCOOP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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