Skip to content

Commit 15afcef

Browse files
authored
Add Vvveb CMS as quick install app (hestiacp#4509)
* Add Vvveb CMS as quick install app * Fixed formatting with prettier --fix
1 parent 84e38dd commit 15afcef

File tree

6 files changed

+508
-0
lines changed

6 files changed

+508
-0
lines changed
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
#=========================================================================#
2+
# Default Web Domain Template #
3+
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
4+
# https://hestiacp.com/docs/server-administration/web-templates.html #
5+
#=========================================================================#
6+
7+
server {
8+
listen %ip%:%web_ssl_port% ssl;
9+
server_name %domain_idn% %alias_idn%;
10+
root %sdocroot%/public;
11+
index index.php index.html index.htm;
12+
access_log /var/log/nginx/domains/%domain%.log combined;
13+
access_log /var/log/nginx/domains/%domain%.bytes bytes;
14+
error_log /var/log/nginx/domains/%domain%.error.log error;
15+
16+
ssl_certificate %ssl_pem%;
17+
ssl_certificate_key %ssl_key%;
18+
ssl_stapling on;
19+
ssl_stapling_verify on;
20+
21+
# TLS 1.3 0-RTT anti-replay
22+
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
23+
if ($anti_replay = 425) { return 425; }
24+
25+
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
26+
27+
28+
set $skip_cache 0;
29+
set $cache_uri $request_uri;
30+
31+
if ($query_string != "") {
32+
set $skip_cache 1;
33+
set $cache_uri null;
34+
set $no_cache 1;
35+
}
36+
37+
# Don't cache uris containing the following segments
38+
if ($request_uri ~* "/admin/|/user/|/cart/|/feed/|index.php|sitemap(_index)?.xml") {
39+
set $skip_cache 1;
40+
set $cache_uri null;
41+
set $no_cache 1;
42+
}
43+
44+
# Don't use the cache for logged in users or if products in cart
45+
if ($http_cookie ~* "nocache|user|cart") {
46+
set $skip_cache 1;
47+
set $cache_uri null;
48+
set $no_cache 1;
49+
}
50+
51+
# POST requests and urls with a query string should always go to PHP
52+
if ($request_method = POST) {
53+
set $skip_cache 1;
54+
set $cache_uri null;
55+
set $no_cache 1;
56+
}
57+
58+
location = /favicon.ico {
59+
log_not_found off;
60+
access_log off;
61+
}
62+
63+
location = /robots.txt {
64+
try_files $uri $uri/ /index.php?$args;
65+
log_not_found off;
66+
access_log off;
67+
}
68+
69+
location ~ /\.(?!well-known\/) {
70+
deny all;
71+
return 404;
72+
}
73+
74+
location / {
75+
default_type text/html;
76+
index index.php index.html index.htm;
77+
try_files /page-cache/$host$cache_uri /page-cache/$host$cache_uri/index.html $uri $uri/ /index.php$is_args$args;
78+
79+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|webp|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
80+
expires 30d;
81+
fastcgi_hide_header "Set-Cookie";
82+
}
83+
84+
location ~ /media/.+?\.php$ {
85+
deny all;
86+
return 404;
87+
}
88+
89+
location ~ [^/]\.php(/|$) {
90+
try_files $uri =404;
91+
92+
include /etc/nginx/fastcgi_params;
93+
94+
fastcgi_index index.php;
95+
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
96+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
97+
98+
fastcgi_pass %backend_lsnr%;
99+
}
100+
}
101+
102+
location /error/ {
103+
alias %home%/%user%/web/%domain%/document_errors/;
104+
}
105+
106+
location /vstats/ {
107+
alias %home%/%user%/web/%domain%/stats/;
108+
include %home%/%user%/web/%domain%/stats/auth.conf*;
109+
}
110+
111+
proxy_hide_header Upgrade;
112+
113+
include /etc/nginx/conf.d/phpmyadmin.inc*;
114+
include /etc/nginx/conf.d/phppgadmin.inc*;
115+
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
116+
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
#=========================================================================#
2+
# Default Web Domain Template #
3+
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
4+
# https://hestiacp.com/docs/server-administration/web-templates.html #
5+
#=========================================================================#
6+
7+
server {
8+
listen %ip%:%web_port%;
9+
server_name %domain_idn% %alias_idn%;
10+
root %docroot%/public;
11+
index index.php index.html index.htm;
12+
access_log /var/log/nginx/domains/%domain%.log combined;
13+
access_log /var/log/nginx/domains/%domain%.bytes bytes;
14+
error_log /var/log/nginx/domains/%domain%.error.log error;
15+
16+
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
17+
18+
set $skip_cache 0;
19+
set $cache_uri $request_uri;
20+
21+
if ($query_string != "") {
22+
set $skip_cache 1;
23+
set $cache_uri null;
24+
set $no_cache 1;
25+
}
26+
27+
# Don't cache uris containing the following segments
28+
if ($request_uri ~* "/admin/|/user/|/cart/|/feed/|index.php|sitemap(_index)?.xml") {
29+
set $skip_cache 1;
30+
set $cache_uri null;
31+
set $no_cache 1;
32+
}
33+
34+
# Don't use the cache for logged in users or if products in cart
35+
if ($http_cookie ~* "nocache|user|cart") {
36+
set $skip_cache 1;
37+
set $cache_uri null;
38+
set $no_cache 1;
39+
}
40+
41+
# POST requests and urls with a query string should always go to PHP
42+
if ($request_method = POST) {
43+
set $skip_cache 1;
44+
set $cache_uri null;
45+
set $no_cache 1;
46+
}
47+
48+
location = /favicon.ico {
49+
log_not_found off;
50+
access_log off;
51+
}
52+
53+
location = /robots.txt {
54+
try_files $uri $uri/ /index.php?$args;
55+
log_not_found off;
56+
access_log off;
57+
}
58+
59+
location ~ /\.(?!well-known\/) {
60+
deny all;
61+
return 404;
62+
}
63+
64+
location / {
65+
default_type text/html;
66+
index index.php index.html index.htm;
67+
try_files /page-cache/$host$cache_uri /page-cache/$host$cache_uri/index.html $uri $uri/ /index.php$is_args$args;
68+
69+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|webp|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
70+
expires 30d;
71+
fastcgi_hide_header "Set-Cookie";
72+
}
73+
74+
location ~ /media/.+?\.php$ {
75+
deny all;
76+
return 404;
77+
}
78+
79+
location ~ [^/]\.php(/|$) {
80+
try_files $uri =404;
81+
82+
include /etc/nginx/fastcgi_params;
83+
84+
fastcgi_index index.php;
85+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
86+
87+
fastcgi_pass %backend_lsnr%;
88+
}
89+
}
90+
91+
location /error/ {
92+
alias %home%/%user%/web/%domain%/document_errors/;
93+
}
94+
95+
location /vstats/ {
96+
alias %home%/%user%/web/%domain%/stats/;
97+
include %home%/%user%/web/%domain%/stats/auth.conf*;
98+
}
99+
100+
include /etc/nginx/conf.d/phpmyadmin.inc*;
101+
include /etc/nginx/conf.d/phppgadmin.inc*;
102+
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
103+
}
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
#=========================================================================#
2+
# Default Web Domain Template #
3+
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
4+
# https://hestiacp.com/docs/server-administration/web-templates.html #
5+
#=========================================================================#
6+
7+
server {
8+
listen %ip%:%web_ssl_port% ssl;
9+
server_name %domain_idn% %alias_idn%;
10+
root %sdocroot%/public;
11+
index index.php index.html index.htm;
12+
access_log /var/log/nginx/domains/%domain%.log combined;
13+
access_log /var/log/nginx/domains/%domain%.bytes bytes;
14+
error_log /var/log/nginx/domains/%domain%.error.log error;
15+
16+
ssl_certificate %ssl_pem%;
17+
ssl_certificate_key %ssl_key%;
18+
ssl_stapling on;
19+
ssl_stapling_verify on;
20+
21+
# TLS 1.3 0-RTT anti-replay
22+
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
23+
if ($anti_replay = 425) { return 425; }
24+
25+
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
26+
27+
28+
set $skip_cache 0;
29+
set $cache_uri $request_uri;
30+
31+
if ($query_string != "") {
32+
set $skip_cache 1;
33+
set $cache_uri null;
34+
set $no_cache 1;
35+
}
36+
37+
# Don't cache uris containing the following segments
38+
if ($request_uri ~* "/admin/|/user/|/cart/|/feed/|index.php|sitemap(_index)?.xml") {
39+
set $skip_cache 1;
40+
set $cache_uri null;
41+
set $no_cache 1;
42+
}
43+
44+
# Don't use the cache for logged in users or if products in cart
45+
if ($http_cookie ~* "nocache|user|cart") {
46+
set $skip_cache 1;
47+
set $cache_uri null;
48+
set $no_cache 1;
49+
}
50+
51+
# POST requests and urls with a query string should always go to PHP
52+
if ($request_method = POST) {
53+
set $skip_cache 1;
54+
set $cache_uri null;
55+
set $no_cache 1;
56+
}
57+
58+
location = /favicon.ico {
59+
log_not_found off;
60+
access_log off;
61+
}
62+
63+
location = /robots.txt {
64+
try_files $uri $uri/ /index.php?$args;
65+
log_not_found off;
66+
access_log off;
67+
}
68+
69+
location ~ /\.(?!well-known\/) {
70+
deny all;
71+
return 404;
72+
}
73+
74+
location / {
75+
default_type text/html;
76+
index index.php index.html index.htm;
77+
try_files /page-cache/$host$cache_uri /page-cache/$host$cache_uri/index.html $uri $uri/ /index.php$is_args$args;
78+
79+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|webp|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
80+
expires 30d;
81+
fastcgi_hide_header "Set-Cookie";
82+
}
83+
84+
location ~ /media/.+?\.php$ {
85+
deny all;
86+
return 404;
87+
}
88+
89+
location ~ [^/]\.php(/|$) {
90+
try_files $uri =404;
91+
92+
include /etc/nginx/fastcgi_params;
93+
94+
fastcgi_index index.php;
95+
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
96+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
97+
98+
fastcgi_pass %backend_lsnr%;
99+
}
100+
}
101+
102+
location /error/ {
103+
alias %home%/%user%/web/%domain%/document_errors/;
104+
}
105+
106+
location /vstats/ {
107+
alias %home%/%user%/web/%domain%/stats/;
108+
include %home%/%user%/web/%domain%/stats/auth.conf*;
109+
}
110+
111+
proxy_hide_header Upgrade;
112+
113+
include /etc/nginx/conf.d/phpmyadmin.inc*;
114+
include /etc/nginx/conf.d/phppgadmin.inc*;
115+
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
116+
}

0 commit comments

Comments
 (0)