-
Notifications
You must be signed in to change notification settings - Fork 1
/
nukeviet4.stpl
82 lines (63 loc) · 2.27 KB
/
nukeviet4.stpl
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
79
80
81
82
server {
listen %ip%:%web_ssl_port%;
server_name %domain_idn% %alias_idn%;
root %sdocroot%;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/%domain%.log combined;
access_log /var/log/nginx/domains/%domain%.bytes bytes;
error_log /var/log/nginx/domains/%domain%.error.log error;
ssl on;
ssl_certificate %ssl_pem%;
ssl_certificate_key %ssl_key%;
location / {
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
expires max;
}
location ~ [^/]\.php(/|$) {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass %backend_lsnr%;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
}
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
location /error/ {
alias %home%/%user%/web/%domain%/document_errors/;
}
location ~* "/\.(htaccess|htpasswd)$" {
deny all;
return 404;
}
if ($request_filename ~ /robots.txt$){
rewrite ^(.*)$ /robots.php?action=$http_host break;
}
rewrite ^/(.*?)install/check.rewrite$ /install/rewrite.php break;
rewrite ^/(.*?)sitemap\.xml$ /index.php?nv=SitemapIndex break;
rewrite "^/(.*?)sitemap\-([a-z]{2})\.xml$" /index.php?language=$2&nv=SitemapIndex break;
rewrite "^/(.*?)sitemap\-([a-z]{2})\.([a-zA-Z0-9-]+)\.xml$" /index.php?language=$2&nv=$3&op=sitemap break;
if (!-e $request_filename){
rewrite (.*)(\/|\.html)$ /index.php;
rewrite /(.*)tag/(.*)$ /index.php;
}
location ~ ^/admin/([a-z0-9]+)/(.*)$ {
deny all;
}
location ~ ^/(config|includes)/(.*)$ {
deny all;
}
location ~ ^/data/(cache|config|ip|ip6|logs)/(.*)$ {
deny all;
}
location ~ ^/(files|uploads|themes)/(.*).(php|ini|tpl|php3|php4|php5|phtml|shtml|inc|asp|aspx|pl|py|jsp|asp|sh|cgi)$ {
deny all;
}
include /etc/nginx/conf.d/phpmyadmin.inc*;
include /etc/nginx/conf.d/phppgadmin.inc*;
include /etc/nginx/conf.d/webmail.inc*;
include %home%/%user%/conf/web/snginx.%domain%.conf*;
}