File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
install/ubuntu/14.04/templates/web/nginx/php5-fpm Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 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+
10+ location / {
11+
12+ try_files $uri $uri / @opencart;
13+
14+ location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
15+ expires max;
16+ }
17+
18+ location ~ [^/]\.php(/|$) {
19+ fastcgi_param SCRIPT_FILENAME $document_root $fastcgi_script_name ;
20+ if (! -f $document_root $fastcgi_script_name ) {
21+ return 404;
22+ }
23+
24+ fastcgi_pass %backend_lsnr%;
25+ fastcgi_index index.php;
26+ include /etc/nginx/fastcgi_params;
27+ }
28+ }
29+
30+ location @opencart {
31+ rewrite ^/(.+)$ /index.php?_route_=$1 last;
32+ }
33+
34+ error_page 403 /error/404.html;
35+ error_page 404 /error/404.html;
36+ error_page 500 502 503 504 /error/50x.html;
37+
38+ location /error/ {
39+ alias % home% /% user% /web/% domain% /document_errors/;
40+ }
41+
42+ location ~* "/\.(htaccess|htpasswd)$" {
43+ deny all;
44+ return 404;
45+ }
46+
47+ include /etc/nginx/conf.d/phpmyadmin.inc*;
48+ include /etc/nginx/conf.d/phppgadmin.inc*;
49+ include /etc/nginx/conf.d/webmail.inc*;
50+
51+ include %home%/%user%/conf/web/nginx.%domain%.conf*;
52+ }
You can’t perform that action at this time.
0 commit comments