Now there are old settings, from 2.3.
There are no errors, but I'm not an expert, please check
Code: Select all
server { server_name domain.com www.domain.com;
add_header X-Xss-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
access_log /home/nginx/domains/domain.com/log/access.log combined buffer=256k flush=5m;
error_log /home/nginx/domains/domain.com/log/error.log;
include /usr/local/nginx/conf/autoprotect/domain.com/autoprotect-domain.com.conf;
root /home/nginx/domains/domain.com/public;
include /usr/local/nginx/conf/503include-main.conf;
location / { include /usr/local/nginx/conf/503include-only.conf; }
include /usr/local/nginx/conf/php.conf;
include /usr/local/nginx/conf/pre-staticfiles-local-domain.com.conf;
include /usr/local/nginx/conf/pre-staticfiles-global.conf;
include /usr/local/nginx/conf/staticfiles.conf;
include /usr/local/nginx/conf/drop.conf;
include /usr/local/nginx/conf/vts_server.conf;
include /usr/local/nginx/conf/opencart.conf;
}
Code: Select all
error_page 503 @maintenance;
location @maintenance { rewrite ^ /maintenance.html break; }
Code: Select all
location ~* ^/system/storage/session/ { allow 127.0.0.1; deny all; }
location ~* ^/system/ { allow 127.0.0.1; deny all; }
Code: Select all
location ~* \/\.ht { deny all; }
location ~* (\.tpl|.twig|\.ini|\.log|(?<!robots)\.txt) { deny all; }
location ~* \/\.git { deny all; }
location ~* \/image.+(\.php) { deny all; }
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; }
location = /sitemap.xml { rewrite ^(.*)$ /index.php?route=extension/feed/google_sitemap last; }
location = /googlebase.xml { rewrite ^(.*)$ /index.php?route=extension/feed/google_base last; }
##location /system { rewrite ^/system/storage/(.*) /index.php?route=error/not_found last; }
location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; }