Skip to content

Commit cc8c395

Browse files
authored
New template for OpenCart CMS
1 parent b8b8115 commit cc8c395

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
server {
2+
listen %ip%:%web_ssl_port%;
3+
server_name %domain_idn% %alias_idn%;
4+
root %sdocroot%;
5+
index index.php index.html index.htm;
6+
access_log /var/log/nginx/domains/%domain%.log combined;
7+
access_log /var/log/nginx/domains/%domain%.bytes bytes;
8+
error_log /var/log/nginx/domains/%domain%.error.log error;
9+
10+
ssl on;
11+
ssl_certificate %ssl_pem%;
12+
ssl_certificate_key %ssl_key%;
13+
14+
location / {
15+
try_files $uri $uri/ @opencart;
16+
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
17+
expires max;
18+
}
19+
20+
location ~ [^/]\.php(/|$) {
21+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
22+
if (!-f $document_root$fastcgi_script_name) {
23+
return 404;
24+
}
25+
26+
fastcgi_pass %backend_lsnr%;
27+
fastcgi_index index.php;
28+
include /etc/nginx/fastcgi_params;
29+
}
30+
}
31+
32+
location @opencart {
33+
rewrite ^/(.+)$ /index.php?_route_=$1 last;
34+
}
35+
36+
error_page 403 /error/404.html;
37+
error_page 404 /error/404.html;
38+
error_page 500 502 503 504 /error/50x.html;
39+
40+
location /error/ {
41+
alias %home%/%user%/web/%domain%/document_errors/;
42+
}
43+
44+
location ~* "/\.(htaccess|htpasswd)$" {
45+
deny all;
46+
return 404;
47+
}
48+
49+
include /etc/nginx/conf.d/phpmyadmin.inc*;
50+
include /etc/nginx/conf.d/phppgadmin.inc*;
51+
include /etc/nginx/conf.d/webmail.inc*;
52+
53+
include %home%/%user%/conf/web/snginx.%domain%.conf*;
54+
}

0 commit comments

Comments
 (0)