Skip to content

Commit 82a2a1b

Browse files
aitorromapokolijaapmarcus
authored
Dolibarr App (hestiacp#4668)
* Dolibarr App * Run NPM Format ---- Co-authored-by: Sergi Almacellas Abellana <sergi@kopen.es> Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
1 parent f44fe69 commit 82a2a1b

File tree

6 files changed

+462
-0
lines changed

6 files changed

+462
-0
lines changed
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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%/htdocs;
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+
location = /favicon.ico {
28+
log_not_found off;
29+
access_log off;
30+
}
31+
32+
location = /robots.txt {
33+
try_files $uri $uri/ /index.php?$args;
34+
log_not_found off;
35+
access_log off;
36+
}
37+
38+
location ~ /\.(?!well-known\/) {
39+
deny all;
40+
return 404;
41+
}
42+
43+
location / {
44+
try_files $uri $uri/ /index.php?$args;
45+
46+
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)$ {
47+
expires 30d;
48+
fastcgi_hide_header "Set-Cookie";
49+
}
50+
51+
location ~* /(?:uploads|files)/.*.php$ {
52+
deny all;
53+
return 404;
54+
}
55+
56+
location ~ [^/]\.php(/|$) {
57+
try_files $uri =404;
58+
59+
include /etc/nginx/fastcgi_params;
60+
61+
fastcgi_index index.php;
62+
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
63+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
64+
65+
fastcgi_pass %backend_lsnr%;
66+
67+
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
68+
69+
}
70+
}
71+
72+
location /error/ {
73+
alias %home%/%user%/web/%domain%/document_errors/;
74+
}
75+
76+
location /vstats/ {
77+
alias %home%/%user%/web/%domain%/stats/;
78+
include %home%/%user%/web/%domain%/stats/auth.conf*;
79+
}
80+
81+
proxy_hide_header Upgrade;
82+
83+
include /etc/nginx/conf.d/phpmyadmin.inc*;
84+
include /etc/nginx/conf.d/phppgadmin.inc*;
85+
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
86+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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%/htdocs;
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+
location = /favicon.ico {
19+
log_not_found off;
20+
access_log off;
21+
}
22+
23+
location = /robots.txt {
24+
try_files $uri $uri/ /index.php?$args;
25+
log_not_found off;
26+
access_log off;
27+
}
28+
29+
location ~ /\.(?!well-known\/) {
30+
deny all;
31+
return 404;
32+
}
33+
34+
location / {
35+
try_files $uri $uri/ /index.php?$args;
36+
37+
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)$ {
38+
expires 30d;
39+
fastcgi_hide_header "Set-Cookie";
40+
}
41+
42+
location ~* /(?:uploads|files)/.*.php$ {
43+
deny all;
44+
return 404;
45+
}
46+
47+
location ~ [^/]\.php(/|$) {
48+
try_files $uri =404;
49+
50+
include /etc/nginx/fastcgi_params;
51+
52+
fastcgi_index index.php;
53+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
54+
55+
fastcgi_pass %backend_lsnr%;
56+
57+
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
58+
59+
}
60+
}
61+
62+
location /error/ {
63+
alias %home%/%user%/web/%domain%/document_errors/;
64+
}
65+
66+
location /vstats/ {
67+
alias %home%/%user%/web/%domain%/stats/;
68+
include %home%/%user%/web/%domain%/stats/auth.conf*;
69+
}
70+
71+
include /etc/nginx/conf.d/phpmyadmin.inc*;
72+
include /etc/nginx/conf.d/phppgadmin.inc*;
73+
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
74+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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%/htdocs;
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+
location = /favicon.ico {
28+
log_not_found off;
29+
access_log off;
30+
}
31+
32+
location = /robots.txt {
33+
try_files $uri $uri/ /index.php?$args;
34+
log_not_found off;
35+
access_log off;
36+
}
37+
38+
location ~ /\.(?!well-known\/) {
39+
deny all;
40+
return 404;
41+
}
42+
43+
location / {
44+
try_files $uri $uri/ /index.php?$args;
45+
46+
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)$ {
47+
expires 30d;
48+
fastcgi_hide_header "Set-Cookie";
49+
}
50+
51+
location ~* /(?:uploads|files)/.*.php$ {
52+
deny all;
53+
return 404;
54+
}
55+
56+
location ~ [^/]\.php(/|$) {
57+
try_files $uri =404;
58+
59+
include /etc/nginx/fastcgi_params;
60+
61+
fastcgi_index index.php;
62+
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
63+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
64+
65+
fastcgi_pass %backend_lsnr%;
66+
67+
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
68+
69+
}
70+
}
71+
72+
location /error/ {
73+
alias %home%/%user%/web/%domain%/document_errors/;
74+
}
75+
76+
location /vstats/ {
77+
alias %home%/%user%/web/%domain%/stats/;
78+
include %home%/%user%/web/%domain%/stats/auth.conf*;
79+
}
80+
81+
proxy_hide_header Upgrade;
82+
83+
include /etc/nginx/conf.d/phpmyadmin.inc*;
84+
include /etc/nginx/conf.d/phppgadmin.inc*;
85+
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
86+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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%/htdocs;
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+
location = /favicon.ico {
19+
log_not_found off;
20+
access_log off;
21+
}
22+
23+
location = /robots.txt {
24+
try_files $uri $uri/ /index.php?$args;
25+
log_not_found off;
26+
access_log off;
27+
}
28+
29+
location ~ /\.(?!well-known\/) {
30+
deny all;
31+
return 404;
32+
}
33+
34+
location / {
35+
try_files $uri $uri/ /index.php?$args;
36+
37+
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)$ {
38+
expires 30d;
39+
fastcgi_hide_header "Set-Cookie";
40+
}
41+
42+
location ~* /(?:uploads|files)/.*.php$ {
43+
deny all;
44+
return 404;
45+
}
46+
47+
location ~ [^/]\.php(/|$) {
48+
try_files $uri =404;
49+
50+
include /etc/nginx/fastcgi_params;
51+
52+
fastcgi_index index.php;
53+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
54+
55+
fastcgi_pass %backend_lsnr%;
56+
57+
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
58+
59+
}
60+
}
61+
62+
location /error/ {
63+
alias %home%/%user%/web/%domain%/document_errors/;
64+
}
65+
66+
location /vstats/ {
67+
alias %home%/%user%/web/%domain%/stats/;
68+
include %home%/%user%/web/%domain%/stats/auth.conf*;
69+
}
70+
71+
include /etc/nginx/conf.d/phpmyadmin.inc*;
72+
include /etc/nginx/conf.d/phppgadmin.inc*;
73+
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
74+
}

0 commit comments

Comments
 (0)