Created
August 7, 2015 16:10
-
-
Save lnoering/3d1338af8216f9807e04 to your computer and use it in GitHub Desktop.
Configuração de vhost para Magento.
This file contains 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
## colocar em /etc/nginx | |
#ini - http://www.magentocommerce.com/magento-connect/speedster-by-fooman.html | |
rewrite ^/minify/([0-9]+)(/.*.(js|css))$ /lib/minify/m.php?f=$2&d=$1 last; | |
rewrite ^/skin/m/([0-9]+)(/.*.(js|css))$ /lib/minify/m.php?f=$2&d=$1 last; | |
#fim - http://www.magentocommerce.com/magento-connect/speedster-by-fooman.html | |
location ~* \.(eot|ttf|woff)$ { | |
add_header Access-Control-Allow-Origin "*"; | |
} | |
## These locations would be hidden by .htaccess normally | |
location ~ (/(app/|includes/|/pkginfo/|var/|report/config.xml)|/\.svn/|/\.git/|/.hta.+){ | |
deny all; | |
} | |
location ^~ /app/ { deny all; } | |
location ^~ /includes/ { deny all; } | |
location ^~ /lib/ { deny all; } | |
location ^~ /media/downloadable/ { deny all; } | |
location ^~ /pkginfo/ { deny all; } | |
location ^~ /report/config.xml { deny all; } | |
location ^~ /var/ { deny all; } | |
location /lib/minify/ { | |
allow all; | |
} | |
#Arrumar url para magento. | |
if (!-e $request_filename) | |
{ | |
# rewrite ^(.+)$ /index.php?q=$1 last; | |
rewrite / /index.php; | |
} | |
location ~* \.(gif|jpg|jpeg|png|css|js)$ { | |
expires max; | |
} | |
location @handler { | |
rewrite / /index.php; | |
} | |
location ~ \.php/ { | |
rewrite ^(.*\.php)/ $1 last; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment