Skip to content
Snippets Groups Projects
Commit 8d3b3cc9 authored by Yu Tang's avatar Yu Tang
Browse files

Merge remote-tracking branch 'mainline/develop' into FearlessKiwis-MAGETWO-36163-benchmark-test

parents 73f99c07 0c404fef
Branches
No related merge requests found
...@@ -18,22 +18,17 @@ ...@@ -18,22 +18,17 @@
# } # }
root $MAGE_ROOT; root $MAGE_ROOT/pub;
index index.php; index index.php;
autoindex off; autoindex off;
# disable_symlinks on;
charset off; charset off;
location /setup/ { location /setup {
rewrite / /setup/index.php; root $MAGE_ROOT;
location /setup/pub/ {}
location /setup/index.php { location ~ ^/setup/index.php {
fastcgi_pass fastcgi_backend; fastcgi_pass fastcgi_backend;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;
...@@ -41,103 +36,87 @@ location /setup/ { ...@@ -41,103 +36,87 @@ location /setup/ {
} }
location / { location / {
root $MAGE_ROOT/pub; try_files $uri $uri/ /index.php?$args;
}
location / {
rewrite / /index.php ;
}
location /static/ {
if ($MAGE_MODE = "production") {
expires max;
}
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
add_header Cache-Control "public";
expires +1y;
if (!-f $request_filename) {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
}
}
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
add_header Cache-Control "no-store";
expires off;
if (!-f $request_filename) { location /pub {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last; alias $MAGE_ROOT/pub;
} }
} location /static/ {
if ($MAGE_MODE = "production") {
expires max;
}
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
add_header Cache-Control "public";
expires +1y;
if (!-f $request_filename) { if (!-f $request_filename) {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last; rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
} }
} }
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
location /media/ { add_header Cache-Control "no-store";
expires off;
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
add_header Cache-Control "public";
expires +1y;
if (!-f $request_filename) {
rewrite / /get.php;
}
}
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
add_header Cache-Control "no-store";
expires off;
if (!-f $request_filename) {
rewrite / /get.php;
}
}
if (!-f $request_filename) { if (!-f $request_filename) {
rewrite / /get.php; rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
} }
} }
if (!-f $request_filename) {
location /media/customer/ { rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
deny all;
} }
}
location /media/downloadable/ { location /media/ {
deny all; try_files $uri $uri/ /get.php?$args;
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
add_header Cache-Control "public";
expires +1y;
try_files $uri $uri/ /get.php?$args;
} }
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
location ~ /media/theme_customization/.*\.xml$ { add_header Cache-Control "no-store";
deny all; expires off;
try_files $uri $uri/ /get.php?$args;
} }
}
location /errors/ { location /media/customer/ {
try_files $uri =404; deny all;
} }
location ~ ^/errors/.*\.(xml|phtml)$ { location /media/downloadable/ {
deny all; deny all;
} }
location ~ cron\.php { location ~ /media/theme_customization/.*\.xml$ {
deny all; deny all;
} }
location ~ (index|get|static|report|404|503)\.php$ { location /errors/ {
expires -1; try_files $uri =404;
fastcgi_pass fastcgi_backend; }
fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off"; location ~ ^/errors/.*\.(xml|phtml)$ {
fastcgi_param PHP_VALUE "memory_limit=256M \n max_execution_time=600"; deny all;
fastcgi_read_timeout 600s; }
fastcgi_connect_timeout 600s;
fastcgi_param MAGE_MODE $MAGE_MODE;
fastcgi_index index.php; location ~ cron\.php {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; deny all;
include fastcgi_params; }
}
location ~ (index|get|static|report|404|503)\.php$ {
try_files $uri =404;
fastcgi_pass fastcgi_backend;
fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
fastcgi_param PHP_VALUE "memory_limit=256M \n max_execution_time=600";
fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;
fastcgi_param MAGE_MODE $MAGE_MODE;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment