Skip to content

Commit a355555

Browse files
Merge pull request hestiacp#1200 from Piotr-Pht-Jasiek/patch-5
Add to template wordpress2(s) rewrite for worpress
2 parents e4ed3ba + 95e71b0 commit a355555

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
server {
2+
listen %ip%:%web_ssl_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+
ssl on;
11+
ssl_certificate %ssl_pem%;
12+
ssl_certificate_key %ssl_key%;
13+
14+
location = /favicon.ico {
15+
log_not_found off;
16+
access_log off;
17+
}
18+
19+
location = /robots.txt {
20+
allow all;
21+
log_not_found off;
22+
access_log off;
23+
}
24+
25+
location / {
26+
try_files $uri $uri/ /index.php?$args;
27+
28+
if (!-e $request_filename)
29+
{
30+
rewrite ^(.+)$ /index.php?q=$1 last;
31+
}
32+
33+
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
34+
expires max;
35+
}
36+
37+
location ~ [^/]\.php(/|$) {
38+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
39+
if (!-f $document_root$fastcgi_script_name) {
40+
return 404;
41+
}
42+
43+
fastcgi_pass %backend_lsnr%;
44+
fastcgi_index index.php;
45+
include /etc/nginx/fastcgi_params;
46+
}
47+
}
48+
49+
error_page 403 /error/404.html;
50+
error_page 404 /error/404.html;
51+
error_page 500 502 503 504 /error/50x.html;
52+
53+
location /error/ {
54+
alias %home%/%user%/web/%domain%/document_errors/;
55+
}
56+
57+
location ~* "/\.(htaccess|htpasswd)$" {
58+
deny all;
59+
return 404;
60+
}
61+
62+
location /vstats/ {
63+
alias %home%/%user%/web/%domain%/stats/;
64+
include %home%/%user%/web/%domain%/stats/auth.conf*;
65+
}
66+
67+
include /etc/nginx/conf.d/phpmyadmin.inc*;
68+
include /etc/nginx/conf.d/phppgadmin.inc*;
69+
include /etc/nginx/conf.d/webmail.inc*;
70+
71+
include %home%/%user%/conf/web/nginx.%domain_idn%.conf*;
72+
}

0 commit comments

Comments
 (0)