Skip to content

Commit 7f00a9d

Browse files
authored
New template for OpenCart CMS
1 parent 456a118 commit 7f00a9d

File tree

1 file changed

+49
-0
lines changed
  • install/ubuntu/13.10/templates/web/nginx/php-fpm

1 file changed

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

0 commit comments

Comments
 (0)