-
Notifications
You must be signed in to change notification settings - Fork 101
/
Copy pathopencart-15.conf
78 lines (62 loc) · 1.7 KB
/
opencart-15.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
root /home/u1/domains/example.com;
rewrite /vqmod/install$ $scheme://$host$uri/ permanent;
location /vqmod/install/ {
index index.php;
}
location = /sitemap.xml {
rewrite ^(.*)$ /index.php?route=feed/google_sitemap break;
}
location = /googlebase.xml {
rewrite ^(.*)$ /index.php?route=feed/google_base break;
}
location / {
try_files $uri $uri/ @opencart;
}
location @opencart {
rewrite ^/(.+)$ /index.php?_route_=$1 last;
}
location ~* \.(engine|inc|info|ini|install|log|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
deny all;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /apple-touch-icon.png {
log_not_found off;
access_log off;
}
location = /apple-touch-icon-precomposed.png {
log_not_found off;
access_log off;
}
location ~* \.(?:3gp|gif|jpg|jpe?g|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|woff)$ {
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location ~ ~$ {
access_log off;
log_not_found off;
deny all;
}
location ~* /(?:cache|logs|image|download)/.*\.php$ {
deny all;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~* \.(eot|otf|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
try_files $fastcgi_script_name =404;
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
fastcgi_pass unix:/var/run/php5-example.com.sock;
fastcgi_index index.php;
include fastcgi.conf;
}