Skip to content

Commit b3350be

Browse files
authored
Merge pull request hestiacp#917 from hestiacp/fix/916_drupal-templates
Update Drupal templates
2 parents 90eabfd + 7a0f52f commit b3350be

File tree

11 files changed

+686
-121
lines changed

11 files changed

+686
-121
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
All notable changes to this project will be documented in this file.
33

44
## [CURRENT] - Development
5+
### Features
56

7+
### Bugfixes
8+
- Improved quality of default web domain templates for Drupal.
9+
610
## [1.2.0] - Major Release (Feature / Quality Update)
711
### Features
812
- **NOTE:** Debian 8 is no longer supported as it has reached EOL (end-of-life) status.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
server {
2+
listen %ip%:%web_ssl_port% ssl http2;
3+
server_name %domain_idn% %alias_idn%;
4+
root %docroot%/web;
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_certificate %ssl_pem%;
11+
ssl_certificate_key %ssl_key%;
12+
ssl_stapling on;
13+
ssl_stapling_verify on;
14+
15+
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
16+
17+
location = /favicon.ico {
18+
log_not_found off;
19+
access_log off;
20+
}
21+
22+
location = /robots.txt {
23+
allow all;
24+
log_not_found off;
25+
access_log off;
26+
}
27+
28+
location ~ \..*/.*\.php$ {
29+
deny all;
30+
return 404;
31+
}
32+
33+
location ~ ^/sites/.*/private/ {
34+
deny all;
35+
return 404;
36+
}
37+
38+
location ~ ^/sites/[^/]+/files/.*\.php$ {
39+
deny all;
40+
return 404;
41+
}
42+
43+
location ~ /\.(?!well-known\/) {
44+
deny all;
45+
return 404;
46+
}
47+
48+
location / {
49+
try_files $uri $uri/ /index.php?$query_string;
50+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
51+
try_files $uri @rewrite;
52+
expires 30d;
53+
fastcgi_hide_header "Set-Cookie";
54+
}
55+
56+
location ~ [^/]\.php(/|$)|^/update.php {
57+
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
58+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
59+
try_files $uri =404;
60+
fastcgi_pass %backend_lsnr%;
61+
fastcgi_index index.php;
62+
fastcgi_param SCRIPT_FILENAME $request_filename;
63+
include /etc/nginx/fastcgi_params;
64+
}
65+
66+
location ~ ^/sites/.*/files/styles/ {
67+
try_files $uri @rewrite;
68+
}
69+
}
70+
71+
location @rewrite {
72+
rewrite ^/(.*)$ /index.php?q=$1;
73+
}
74+
75+
rewrite ^/index.php/(.*) /$1 permanent;
76+
77+
location /error/ {
78+
alias %home%/%user%/web/%domain%/document_errors/;
79+
}
80+
81+
location /vstats/ {
82+
alias %home%/%user%/web/%domain%/stats/;
83+
include %home%/%user%/web/%domain%/stats/auth.conf*;
84+
}
85+
86+
include /etc/nginx/conf.d/phpmyadmin.inc*;
87+
include /etc/nginx/conf.d/phppgadmin.inc*;
88+
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
89+
}
90+
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
server {
2+
listen %ip%:%web_port%;
3+
server_name %domain_idn% %alias_idn%;
4+
root %docroot%/web;
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+
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
11+
12+
location = /favicon.ico {
13+
log_not_found off;
14+
access_log off;
15+
}
16+
17+
location = /robots.txt {
18+
allow all;
19+
log_not_found off;
20+
access_log off;
21+
}
22+
23+
location ~ \..*/.*\.php$ {
24+
deny all;
25+
return 404;
26+
}
27+
28+
location ~ ^/sites/.*/private/ {
29+
deny all;
30+
return 404;
31+
}
32+
33+
location ~ ^/sites/[^/]+/files/.*\.php$ {
34+
deny all;
35+
return 404;
36+
}
37+
38+
location ~ /\.(?!well-known\/) {
39+
deny all;
40+
return 404;
41+
}
42+
43+
location / {
44+
try_files $uri $uri/ /index.php?$query_string;
45+
46+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
47+
try_files $uri @rewrite;
48+
expires 30d;
49+
fastcgi_hide_header "Set-Cookie";
50+
}
51+
52+
location ~ [^/]\.php(/|$)|^/update.php {
53+
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
54+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
55+
try_files $uri =404;
56+
fastcgi_pass %backend_lsnr%;
57+
fastcgi_index index.php;
58+
fastcgi_param SCRIPT_FILENAME $request_filename;
59+
include /etc/nginx/fastcgi_params;
60+
}
61+
62+
location ~ ^/sites/.*/files/styles/ {
63+
try_files $uri @rewrite;
64+
}
65+
}
66+
67+
location @rewrite {
68+
rewrite ^/(.*)$ /index.php?q=$1;
69+
}
70+
71+
rewrite ^/index.php/(.*) /$1 permanent;
72+
73+
location /error/ {
74+
alias %home%/%user%/web/%domain%/document_errors/;
75+
}
76+
77+
location /vstats/ {
78+
alias %home%/%user%/web/%domain%/stats/;
79+
include %home%/%user%/web/%domain%/stats/auth.conf*;
80+
}
81+
82+
include /etc/nginx/conf.d/phpmyadmin.inc*;
83+
include /etc/nginx/conf.d/phppgadmin.inc*;
84+
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
85+
}
86+
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
server {
2+
listen %ip%:%web_ssl_port% ssl http2;
3+
server_name %domain_idn% %alias_idn%;
4+
root %docroot%/html;
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_certificate %ssl_pem%;
11+
ssl_certificate_key %ssl_key%;
12+
ssl_stapling on;
13+
ssl_stapling_verify on;
14+
15+
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
16+
17+
location = /favicon.ico {
18+
log_not_found off;
19+
access_log off;
20+
}
21+
22+
location = /robots.txt {
23+
allow all;
24+
log_not_found off;
25+
access_log off;
26+
}
27+
28+
location ~ \..*/.*\.php$ {
29+
deny all;
30+
return 404;
31+
}
32+
33+
location ~ ^/sites/.*/private/ {
34+
deny all;
35+
return 404;
36+
}
37+
38+
location ~ ^/sites/[^/]+/files/.*\.php$ {
39+
deny all;
40+
return 404;
41+
}
42+
43+
location ~ /\.(?!well-known\/) {
44+
deny all;
45+
return 404;
46+
}
47+
48+
location / {
49+
try_files $uri $uri/ /index.php?$query_string;
50+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
51+
try_files $uri @rewrite;
52+
expires 30d;
53+
fastcgi_hide_header "Set-Cookie";
54+
}
55+
56+
location ~ [^/]\.php(/|$)|^/update.php {
57+
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
58+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
59+
try_files $uri =404;
60+
fastcgi_pass %backend_lsnr%;
61+
fastcgi_index index.php;
62+
fastcgi_param SCRIPT_FILENAME $request_filename;
63+
include /etc/nginx/fastcgi_params;
64+
}
65+
66+
location ~ ^/sites/.*/files/styles/ {
67+
try_files $uri @rewrite;
68+
}
69+
}
70+
71+
location @rewrite {
72+
rewrite ^/(.*)$ /index.php?q=$1;
73+
}
74+
75+
rewrite ^/index.php/(.*) /$1 permanent;
76+
77+
location /error/ {
78+
alias %home%/%user%/web/%domain%/document_errors/;
79+
}
80+
81+
location /vstats/ {
82+
alias %home%/%user%/web/%domain%/stats/;
83+
include %home%/%user%/web/%domain%/stats/auth.conf*;
84+
}
85+
86+
include /etc/nginx/conf.d/phpmyadmin.inc*;
87+
include /etc/nginx/conf.d/phppgadmin.inc*;
88+
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
89+
}
90+
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
server {
2+
listen %ip%:%web_port%;
3+
server_name %domain_idn% %alias_idn%;
4+
root %docroot%/html;
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+
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
11+
12+
location = /favicon.ico {
13+
log_not_found off;
14+
access_log off;
15+
}
16+
17+
location = /robots.txt {
18+
allow all;
19+
log_not_found off;
20+
access_log off;
21+
}
22+
23+
location ~ \..*/.*\.php$ {
24+
deny all;
25+
return 404;
26+
}
27+
28+
location ~ ^/sites/.*/private/ {
29+
deny all;
30+
return 404;
31+
}
32+
33+
location ~ ^/sites/[^/]+/files/.*\.php$ {
34+
deny all;
35+
return 404;
36+
}
37+
38+
location ~ /\.(?!well-known\/) {
39+
deny all;
40+
return 404;
41+
}
42+
43+
location / {
44+
try_files $uri $uri/ /index.php?$query_string;
45+
46+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
47+
try_files $uri @rewrite;
48+
expires 30d;
49+
fastcgi_hide_header "Set-Cookie";
50+
}
51+
52+
location ~ [^/]\.php(/|$)|^/update.php {
53+
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
54+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
55+
try_files $uri =404;
56+
fastcgi_pass %backend_lsnr%;
57+
fastcgi_index index.php;
58+
fastcgi_param SCRIPT_FILENAME $request_filename;
59+
include /etc/nginx/fastcgi_params;
60+
}
61+
62+
location ~ ^/sites/.*/files/styles/ {
63+
try_files $uri @rewrite;
64+
}
65+
}
66+
67+
location @rewrite {
68+
rewrite ^/(.*)$ /index.php?q=$1;
69+
}
70+
71+
rewrite ^/index.php/(.*) /$1 permanent;
72+
73+
location /error/ {
74+
alias %home%/%user%/web/%domain%/document_errors/;
75+
}
76+
77+
location /vstats/ {
78+
alias %home%/%user%/web/%domain%/stats/;
79+
include %home%/%user%/web/%domain%/stats/auth.conf*;
80+
}
81+
82+
include /etc/nginx/conf.d/phpmyadmin.inc*;
83+
include /etc/nginx/conf.d/phppgadmin.inc*;
84+
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
85+
}
86+

0 commit comments

Comments
 (0)