Initial
This commit is contained in:
99
install/deb/templates/web/nginx/php-fpm/chevereto.stpl
Normal file
99
install/deb/templates/web/nginx/php-fpm/chevereto.stpl
Normal file
@@ -0,0 +1,99 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
client_max_body_size 1G;
|
||||
client_body_buffer_size 1024k;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~* /(app|content|lib)/.*\.(po|php|lock|sql)$ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~* /.*\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js) {
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
}
|
||||
|
||||
location ^~ /images/ {
|
||||
location ~* (jpe?g|png|webp|gif) {
|
||||
log_not_found off;
|
||||
error_page 404 /content/images/system/default/404.gif;
|
||||
}
|
||||
return 403;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
87
install/deb/templates/web/nginx/php-fpm/chevereto.tpl
Normal file
87
install/deb/templates/web/nginx/php-fpm/chevereto.tpl
Normal file
@@ -0,0 +1,87 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
client_max_body_size 1G;
|
||||
client_body_buffer_size 1024k;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~* /(app|content|lib)/.*\.(po|php|lock|sql)$ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~* /.*\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js) {
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
}
|
||||
|
||||
location ^~ /images/ {
|
||||
location ~* (jpe?g|png|webp|gif) {
|
||||
log_not_found off;
|
||||
error_page 404 /content/images/system/default/404.gif;
|
||||
}
|
||||
return 403;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
69
install/deb/templates/web/nginx/php-fpm/cms_made_simple.stpl
Normal file
69
install/deb/templates/web/nginx/php-fpm/cms_made_simple.stpl
Normal file
@@ -0,0 +1,69 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?page=$request_uri;
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
57
install/deb/templates/web/nginx/php-fpm/cms_made_simple.tpl
Normal file
57
install/deb/templates/web/nginx/php-fpm/cms_made_simple.tpl
Normal file
@@ -0,0 +1,57 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?page=$request_uri;
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
85
install/deb/templates/web/nginx/php-fpm/codeigniter.stpl
Normal file
85
install/deb/templates/web/nginx/php-fpm/codeigniter.stpl
Normal file
@@ -0,0 +1,85 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ /(application|system|README.md|CHANGELOG.md|LICENSE) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
73
install/deb/templates/web/nginx/php-fpm/codeigniter.tpl
Normal file
73
install/deb/templates/web/nginx/php-fpm/codeigniter.tpl
Normal file
@@ -0,0 +1,73 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ /(application|system|README.md|CHANGELOG.md|LICENSE) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
88
install/deb/templates/web/nginx/php-fpm/craftcms.stpl
Normal file
88
install/deb/templates/web/nginx/php-fpm/craftcms.stpl
Normal file
@@ -0,0 +1,88 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %sdocroot%/web;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
# Craft-specific location handlers to ensure AdminCP requests route through index.php
|
||||
# If you change your "cpTrigger", change it here as well
|
||||
location ^~ /admin {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ^~ /cpresources {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
75
install/deb/templates/web/nginx/php-fpm/craftcms.tpl
Normal file
75
install/deb/templates/web/nginx/php-fpm/craftcms.tpl
Normal file
@@ -0,0 +1,75 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%/web;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
# Craft-specific location handlers to ensure AdminCP requests route through index.php
|
||||
# If you change your "cpTrigger", change it here as well
|
||||
location ^~ /admin {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ^~ /cpresources {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
140
install/deb/templates/web/nginx/php-fpm/datalife_engine.stpl
Normal file
140
install/deb/templates/web/nginx/php-fpm/datalife_engine.stpl
Normal file
@@ -0,0 +1,140 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
|
||||
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
|
||||
|
||||
rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
|
||||
rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
|
||||
rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
|
||||
rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
|
||||
|
||||
rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
|
||||
rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
|
||||
rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
|
||||
rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
|
||||
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
|
||||
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
|
||||
|
||||
rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
|
||||
rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
|
||||
|
||||
rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
|
||||
rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
|
||||
|
||||
rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
|
||||
rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
|
||||
|
||||
rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
|
||||
rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
|
||||
rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
|
||||
rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
|
||||
rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
|
||||
rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
|
||||
|
||||
rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
|
||||
rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
|
||||
|
||||
rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
|
||||
rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
|
||||
rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
|
||||
|
||||
rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
|
||||
rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
|
||||
|
||||
rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
|
||||
rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
|
||||
|
||||
rewrite "^/rules.html$" /index.php?do=rules last;
|
||||
rewrite "^/statistics.html$" /index.php?do=stats last;
|
||||
rewrite "^/addnews.html$" /index.php?do=addnews last;
|
||||
rewrite "^/rss.xml$" /engine/rss.php last;
|
||||
rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
|
||||
|
||||
if (!-d $request_filename) {
|
||||
rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
|
||||
rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
|
||||
}
|
||||
|
||||
if (!-f $request_filename) {
|
||||
rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
|
||||
rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
|
||||
rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
|
||||
}
|
||||
|
||||
if (!-f $request_filename) {
|
||||
rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
|
||||
}
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
128
install/deb/templates/web/nginx/php-fpm/datalife_engine.tpl
Normal file
128
install/deb/templates/web/nginx/php-fpm/datalife_engine.tpl
Normal file
@@ -0,0 +1,128 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
|
||||
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 last;
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$" /engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 last;
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$" /index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 last;
|
||||
|
||||
rewrite "^/([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 last;
|
||||
rewrite "^/([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 last;
|
||||
rewrite "^/([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 last;
|
||||
rewrite "^/([^.]+)/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&seourl=$3&seocat=$1 last;
|
||||
|
||||
rewrite "^/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 last;
|
||||
rewrite "^/page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$2&news_page=$1&seourl=$3 last;
|
||||
rewrite "^/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$" /engine/print.php?news_page=$1&newsid=$2&seourl=$3 last;
|
||||
rewrite "^/([0-9]+)-(.*).html(/?)+$" /index.php?newsid=$1&seourl=$2 last;
|
||||
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2&day=$3 last;
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&day=$3&cstart=$4 last;
|
||||
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})(/?)+$" /index.php?year=$1&month=$2 last;
|
||||
rewrite "^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$" /index.php?year=$1&month=$2&cstart=$3 last;
|
||||
|
||||
rewrite "^/([0-9]{4})(/?)+$" /index.php?year=$1 last;
|
||||
rewrite "^/([0-9]{4})/page/([0-9]+)(/?)+$" /index.php?year=$1&cstart=$2 last;
|
||||
|
||||
rewrite "^/tags/([^/]*)(/?)+$" /index.php?do=tags&tag=$1 last;
|
||||
rewrite "^/tags/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=tags&tag=$1&cstart=$2 last;
|
||||
|
||||
rewrite "^/xfsearch/([^/]*)(/?)+$" /index.php?do=xfsearch&xf=$1 last;
|
||||
rewrite "^/xfsearch/([^/]*)/page/([0-9]+)(/?)+$" /index.php?do=xfsearch&xf=$1&cstart=$2 last;
|
||||
|
||||
rewrite "^/user/([^/]*)/rss.xml$" /engine/rss.php?subaction=allnews&user=$1 last;
|
||||
rewrite "^/user/([^/]*)(/?)+$" /index.php?subaction=userinfo&user=$1 last;
|
||||
rewrite "^/user/([^/]*)/page/([0-9]+)(/?)+$" /index.php?subaction=userinfo&user=$1&cstart=$2 last;
|
||||
rewrite "^/user/([^/]*)/news(/?)+$" /index.php?subaction=allnews&user=$1 last;
|
||||
rewrite "^/user/([^/]*)/news/page/([0-9]+)(/?)+$" /index.php?subaction=allnews&user=$1&cstart=$2 last;
|
||||
rewrite "^/user/([^/]*)/news/rss.xml(/?)+$" /engine/rss.php?subaction=allnews&user=$1 last;
|
||||
|
||||
rewrite "^/lastnews(/?)+$" /index.php?do=lastnews last;
|
||||
rewrite "^/lastnews/page/([0-9]+)(/?)+$" /index.php?do=lastnews&cstart=$1 last;
|
||||
|
||||
rewrite "^/catalog/([^/]*)/rss.xml$" /engine/rss.php?catalog=$1 last;
|
||||
rewrite "^/catalog/([^/]*)(/?)+$" /index.php?catalog=$1 last;
|
||||
rewrite "^/catalog/([^/]*)/page/([0-9]+)(/?)+$" /index.php?catalog=$1&cstart=$2 last;
|
||||
|
||||
rewrite "^/newposts(/?)+$" /index.php?subaction=newposts last;
|
||||
rewrite "^/newposts/page/([0-9]+)(/?)+$" /index.php?subaction=newposts&cstart=$1 last;
|
||||
|
||||
rewrite "^/favorites(/?)+$" /index.php?do=favorites last;
|
||||
rewrite "^/favorites/page/([0-9]+)(/?)+$" /index.php?do=favorites&cstart=$1 last;
|
||||
|
||||
rewrite "^/rules.html$" /index.php?do=rules last;
|
||||
rewrite "^/statistics.html$" /index.php?do=stats last;
|
||||
rewrite "^/addnews.html$" /index.php?do=addnews last;
|
||||
rewrite "^/rss.xml$" /engine/rss.php last;
|
||||
rewrite "^/sitemap.xml$" /uploads/sitemap.xml last;
|
||||
|
||||
if (!-d $request_filename) {
|
||||
rewrite "^/([^.]+)/page/([0-9]+)(/?)+$" /index.php?do=cat&category=$1&cstart=$2 last;
|
||||
rewrite "^/([^.]+)/?$" /index.php?do=cat&category=$1 last;
|
||||
}
|
||||
|
||||
if (!-f $request_filename) {
|
||||
rewrite "^/([^.]+)/rss.xml$" /engine/rss.php?do=cat&category=$1 last;
|
||||
rewrite "^/page,([0-9]+),([^/]+).html$" /index.php?do=static&page=$2&news_page=$1 last;
|
||||
rewrite "^/print:([^/]+).html$" /engine/print.php?do=static&page=$1 last;
|
||||
}
|
||||
|
||||
if (!-f $request_filename) {
|
||||
rewrite "^/([^/]+).html$" /index.php?do=static&page=$1 last;
|
||||
}
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
67
install/deb/templates/web/nginx/php-fpm/default.stpl
Normal file
67
install/deb/templates/web/nginx/php-fpm/default.stpl
Normal file
@@ -0,0 +1,67 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
55
install/deb/templates/web/nginx/php-fpm/default.tpl
Normal file
55
install/deb/templates/web/nginx/php-fpm/default.tpl
Normal file
@@ -0,0 +1,55 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
85
install/deb/templates/web/nginx/php-fpm/dokuwiki.stpl
Normal file
85
install/deb/templates/web/nginx/php-fpm/dokuwiki.stpl
Normal file
@@ -0,0 +1,85 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
index doku.php;
|
||||
|
||||
try_files $uri $uri/ @dokuwiki;
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ ^/lib.*\.(gif|png|webp|ico|jpg)$ {
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location ^~ /conf/ { return 403; }
|
||||
location ^~ /data/ { return 403; }
|
||||
|
||||
location @dokuwiki {
|
||||
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
|
||||
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
|
||||
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
|
||||
rewrite ^/(.*) /doku.php?id=$1 last;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
73
install/deb/templates/web/nginx/php-fpm/dokuwiki.tpl
Normal file
73
install/deb/templates/web/nginx/php-fpm/dokuwiki.tpl
Normal file
@@ -0,0 +1,73 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
index doku.php;
|
||||
|
||||
try_files $uri $uri/ @dokuwiki;
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ ^/lib.*\.(gif|png|webp|ico|jpg)$ {
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location ^~ /conf/ { return 403; }
|
||||
location ^~ /data/ { return 403; }
|
||||
|
||||
location @dokuwiki {
|
||||
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
|
||||
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
|
||||
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
|
||||
rewrite ^/(.*) /doku.php?id=$1 last;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
119
install/deb/templates/web/nginx/php-fpm/drupal-composer.stpl
Normal file
119
install/deb/templates/web/nginx/php-fpm/drupal-composer.stpl
Normal file
@@ -0,0 +1,119 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %sdocroot%/web;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/private/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
||||
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)$ {
|
||||
try_files $uri @rewrite;
|
||||
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ \..*/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ ^/sites/[^/]+/files/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
set $no_cache 0;
|
||||
|
||||
if ($request_uri ~* "/user/|/admin/|index.php") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
|
||||
if ($http_cookie ~ SESS) {
|
||||
set $no_cache 1;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/files/styles/ {
|
||||
try_files $uri @rewrite;
|
||||
}
|
||||
}
|
||||
|
||||
location @rewrite {
|
||||
rewrite ^/(.*)$ /index.php?q=$1;
|
||||
}
|
||||
|
||||
rewrite ^/index.php/(.*) /$1 permanent;
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
108
install/deb/templates/web/nginx/php-fpm/drupal-composer.tpl
Normal file
108
install/deb/templates/web/nginx/php-fpm/drupal-composer.tpl
Normal file
@@ -0,0 +1,108 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%/web;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/private/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
||||
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)$ {
|
||||
try_files $uri @rewrite;
|
||||
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ \..*/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ ^/sites/[^/]+/files/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
set $no_cache 0;
|
||||
|
||||
if ($request_uri ~* "/user/|/admin/|index.php") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
|
||||
if ($http_cookie ~ SESS) {
|
||||
set $no_cache 1;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/files/styles/ {
|
||||
try_files $uri @rewrite;
|
||||
}
|
||||
}
|
||||
|
||||
location @rewrite {
|
||||
rewrite ^/(.*)$ /index.php?q=$1;
|
||||
}
|
||||
|
||||
rewrite ^/index.php/(.*) /$1 permanent;
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
119
install/deb/templates/web/nginx/php-fpm/drupal-social.stpl
Normal file
119
install/deb/templates/web/nginx/php-fpm/drupal-social.stpl
Normal file
@@ -0,0 +1,119 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %sdocroot%/html;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/private/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
||||
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)$ {
|
||||
try_files $uri @rewrite;
|
||||
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ \..*/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ ^/sites/[^/]+/files/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
set $no_cache 0;
|
||||
|
||||
if ($request_uri ~* "/user/|/admin/|index.php") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
|
||||
if ($http_cookie ~ SESS) {
|
||||
set $no_cache 1;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/files/styles/ {
|
||||
try_files $uri @rewrite;
|
||||
}
|
||||
}
|
||||
|
||||
location @rewrite {
|
||||
rewrite ^/(.*)$ /index.php?q=$1;
|
||||
}
|
||||
|
||||
rewrite ^/index.php/(.*) /$1 permanent;
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
107
install/deb/templates/web/nginx/php-fpm/drupal-social.tpl
Normal file
107
install/deb/templates/web/nginx/php-fpm/drupal-social.tpl
Normal file
@@ -0,0 +1,107 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%/html;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/private/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
||||
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)$ {
|
||||
try_files $uri @rewrite;
|
||||
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ \..*/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ ^/sites/[^/]+/files/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
set $no_cache 0;
|
||||
|
||||
if ($request_uri ~* "/user/|/admin/|index.php") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
|
||||
if ($http_cookie ~ SESS) {
|
||||
set $no_cache 1;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/files/styles/ {
|
||||
try_files $uri @rewrite;
|
||||
}
|
||||
}
|
||||
|
||||
location @rewrite {
|
||||
rewrite ^/(.*)$ /index.php?q=$1;
|
||||
}
|
||||
|
||||
rewrite ^/index.php/(.*) /$1 permanent;
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
129
install/deb/templates/web/nginx/php-fpm/drupal.stpl
Normal file
129
install/deb/templates/web/nginx/php-fpm/drupal.stpl
Normal file
@@ -0,0 +1,129 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /(changelog.txt|copyright.txt|install.mysql.txt|install.pgsql.txt|install.sqlite.txt|install.txt|license.txt|maintainers.txt|license|license.txt|readme.txt|readme.md|upgrade.txt) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/private/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ /vendor/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
||||
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)$ {
|
||||
try_files $uri @rewrite;
|
||||
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ \..*/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ ^/sites/[^/]+/files/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
set $no_cache 0;
|
||||
|
||||
if ($request_uri ~* "/user/|/admin/|index.php") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
|
||||
if ($http_cookie ~ SESS) {
|
||||
set $no_cache 1;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/files/styles/ {
|
||||
try_files $uri @rewrite;
|
||||
}
|
||||
}
|
||||
|
||||
location @rewrite {
|
||||
rewrite ^/(.*)$ /index.php?q=$1;
|
||||
}
|
||||
|
||||
rewrite ^/index.php/(.*) /$1 permanent;
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
117
install/deb/templates/web/nginx/php-fpm/drupal.tpl
Normal file
117
install/deb/templates/web/nginx/php-fpm/drupal.tpl
Normal file
@@ -0,0 +1,117 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /(changelog.txt|copyright.txt|install.mysql.txt|install.pgsql.txt|install.sqlite.txt|install.txt|license.txt|maintainers.txt|license|license.txt|readme.txt|readme.md|upgrade.txt) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/private/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ /vendor/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
||||
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)$ {
|
||||
try_files $uri @rewrite;
|
||||
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ \..*/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ ^/sites/[^/]+/files/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
set $no_cache 0;
|
||||
|
||||
if ($request_uri ~* "/user/|/admin/|index.php") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
|
||||
if ($http_cookie ~ SESS) {
|
||||
set $no_cache 1;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/files/styles/ {
|
||||
try_files $uri @rewrite;
|
||||
}
|
||||
}
|
||||
|
||||
location @rewrite {
|
||||
rewrite ^/(.*)$ /index.php?q=$1;
|
||||
}
|
||||
|
||||
rewrite ^/index.php/(.*) /$1 permanent;
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
94
install/deb/templates/web/nginx/php-fpm/flarum.stpl
Normal file
94
install/deb/templates/web/nginx/php-fpm/flarum.stpl
Normal file
@@ -0,0 +1,94 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
# Pass requests that don't refer directly to files in the filesystem to index.php
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
# Uncomment the following lines if you are not using a "public" directory
|
||||
# to prevent sensitive resources from being exposed.
|
||||
location ~* ^/(\.git|composer\.(json|lock)|auth\.json|config\.php|flarum|storage|vendor) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# The following directives are based on best practices from H5BP Nginx Server Configs
|
||||
# https://github.com/h5bp/server-configs-nginx
|
||||
|
||||
# Expire rules for static content
|
||||
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
|
||||
add_header Cache-Control "max-age=0";
|
||||
}
|
||||
|
||||
location ~* \.(?:rss|atom)$ {
|
||||
add_header Cache-Control "max-age=3600";
|
||||
}
|
||||
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc)$ {
|
||||
add_header Cache-Control "max-age=2592000";
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~* \.(?:css|js)$ {
|
||||
add_header Cache-Control "max-age=31536000";
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ {
|
||||
add_header Cache-Control "max-age=2592000";
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
82
install/deb/templates/web/nginx/php-fpm/flarum.tpl
Normal file
82
install/deb/templates/web/nginx/php-fpm/flarum.tpl
Normal file
@@ -0,0 +1,82 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
# Pass requests that don't refer directly to files in the filesystem to index.php
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
# Uncomment the following lines if you are not using a "public" directory
|
||||
# to prevent sensitive resources from being exposed.
|
||||
location ~* ^/(\.git|composer\.(json|lock)|auth\.json|config\.php|flarum|storage|vendor) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# The following directives are based on best practices from H5BP Nginx Server Configs
|
||||
# https://github.com/h5bp/server-configs-nginx
|
||||
|
||||
# Expire rules for static content
|
||||
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
|
||||
add_header Cache-Control "max-age=0";
|
||||
}
|
||||
|
||||
location ~* \.(?:rss|atom)$ {
|
||||
add_header Cache-Control "max-age=3600";
|
||||
}
|
||||
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc)$ {
|
||||
add_header Cache-Control "max-age=2592000";
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~* \.(?:css|js)$ {
|
||||
add_header Cache-Control "max-age=31536000";
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ {
|
||||
add_header Cache-Control "max-age=2592000";
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
61
install/deb/templates/web/nginx/php-fpm/gitea.stpl
Normal file
61
install/deb/templates/web/nginx/php-fpm/gitea.stpl
Normal file
@@ -0,0 +1,61 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location ~ /.well-known {
|
||||
allow all;
|
||||
}
|
||||
|
||||
location / {
|
||||
client_max_body_size 512M;
|
||||
|
||||
proxy_max_temp_file_size 0;
|
||||
proxy_read_timeout 120;
|
||||
proxy_redirect off;
|
||||
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Early-Data $rfc_early_data;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
proxy_pass http://localhost:3000;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
49
install/deb/templates/web/nginx/php-fpm/gitea.tpl
Normal file
49
install/deb/templates/web/nginx/php-fpm/gitea.tpl
Normal file
@@ -0,0 +1,49 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location ~ /.well-known {
|
||||
allow all;
|
||||
}
|
||||
|
||||
location / {
|
||||
client_max_body_size 512M;
|
||||
|
||||
proxy_max_temp_file_size 0;
|
||||
proxy_read_timeout 120;
|
||||
proxy_redirect off;
|
||||
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
proxy_pass http://localhost:3000;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
72
install/deb/templates/web/nginx/php-fpm/grav.stpl
Normal file
72
install/deb/templates/web/nginx/php-fpm/grav.stpl
Normal file
@@ -0,0 +1,72 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
}
|
||||
}
|
||||
|
||||
location ~* /(\.git|cache|bin|logs|backup|tests)/.*$ { return 403; }
|
||||
location ~* /(system|vendor)/.*\.(txt|xml|md|html|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
|
||||
location ~* /user/.*\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
|
||||
location ~ /(LICENSE\.txt|composer\.lock|composer\.json|nginx\.conf|web\.config|htaccess\.txt|\.htaccess) { return 403; }
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
60
install/deb/templates/web/nginx/php-fpm/grav.tpl
Normal file
60
install/deb/templates/web/nginx/php-fpm/grav.tpl
Normal file
@@ -0,0 +1,60 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
}
|
||||
}
|
||||
|
||||
location ~* /(\.git|cache|bin|logs|backup|tests)/.*$ { return 403; }
|
||||
location ~* /(system|vendor)/.*\.(txt|xml|md|html|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
|
||||
location ~* /user/.*\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
|
||||
location ~ /(LICENSE\.txt|composer\.lock|composer\.json|nginx\.conf|web\.config|htaccess\.txt|\.htaccess) { return 403; }
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
90
install/deb/templates/web/nginx/php-fpm/joomla.stpl
Normal file
90
install/deb/templates/web/nginx/php-fpm/joomla.stpl
Normal file
@@ -0,0 +1,90 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
if ($request_uri ~* "/administrator/|index.php") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
77
install/deb/templates/web/nginx/php-fpm/joomla.tpl
Normal file
77
install/deb/templates/web/nginx/php-fpm/joomla.tpl
Normal file
@@ -0,0 +1,77 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
if ($request_uri ~* "/administrator/|index.php") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
80
install/deb/templates/web/nginx/php-fpm/laravel.stpl
Normal file
80
install/deb/templates/web/nginx/php-fpm/laravel.stpl
Normal file
@@ -0,0 +1,80 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %sdocroot%/public;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
68
install/deb/templates/web/nginx/php-fpm/laravel.tpl
Normal file
68
install/deb/templates/web/nginx/php-fpm/laravel.tpl
Normal file
@@ -0,0 +1,68 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%/public;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
208
install/deb/templates/web/nginx/php-fpm/magento.stpl
Normal file
208
install/deb/templates/web/nginx/php-fpm/magento.stpl
Normal file
@@ -0,0 +1,208 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %sdocroot%/pub;
|
||||
index index.php;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
add_header "X-UA-Compatible" "IE=Edge";
|
||||
error_page 404 403 = /errors/404.php;
|
||||
|
||||
# PHP entry point for setup application
|
||||
location ~* ^/setup($|/) {
|
||||
root %sdocroot%;
|
||||
|
||||
location ~ ^/setup/index.php {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
location ~ ^/setup/(?!pub/). {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ ^/setup/pub/ {
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
}
|
||||
}
|
||||
|
||||
# PHP entry point for update application
|
||||
location ~* ^/update($|/) {
|
||||
root %sdocroot%;
|
||||
|
||||
location ~ ^/update/index.php {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(/update/index.php)(/.+)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
# Deny everything but index.php
|
||||
location ~ ^/update/(?!pub/). {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ ^/update/pub/ {
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
}
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
location /pub/ {
|
||||
location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
alias %sdocroot%/pub/;
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
}
|
||||
|
||||
location /static/ {
|
||||
# Uncomment the following line in production mode
|
||||
# expires max;
|
||||
|
||||
# Remove signature of the static files that is used to overcome the browser cache
|
||||
location ~ ^/static/version {
|
||||
rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
|
||||
}
|
||||
|
||||
location ~* \.(ico|jpg|jpeg|png|webp|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
|
||||
add_header Cache-Control "public";
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
expires +1y;
|
||||
|
||||
if (!-f $request_filename) {
|
||||
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
|
||||
}
|
||||
}
|
||||
|
||||
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
|
||||
add_header Cache-Control "no-store";
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
expires off;
|
||||
|
||||
if (!-f $request_filename) {
|
||||
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
|
||||
}
|
||||
}
|
||||
|
||||
if (!-f $request_filename) {
|
||||
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
|
||||
}
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
}
|
||||
|
||||
location /media/ {
|
||||
try_files $uri $uri/ /get.php?$args;
|
||||
|
||||
location ~ ^/media/theme_customization/.*\.xml {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~* \.(ico|jpg|jpeg|png|webp|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
|
||||
try_files $uri $uri/ /get.php?$args;
|
||||
|
||||
add_header Cache-Control "public";
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
expires +1y;
|
||||
}
|
||||
|
||||
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
|
||||
try_files $uri $uri/ /get.php?$args;
|
||||
|
||||
add_header Cache-Control "no-store";
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
expires off;
|
||||
}
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
}
|
||||
|
||||
location /media/customer/ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /media/downloadable/ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /media/import/ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
# PHP entry point for main application
|
||||
location ~ (index|get|static|report|404|503)\.php$ {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_buffers 1024 4k;
|
||||
fastcgi_connect_timeout 600s;
|
||||
fastcgi_read_timeout 600s;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
# Banned locations (only reached if the earlier PHP entry point regexes don't match)
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
193
install/deb/templates/web/nginx/php-fpm/magento.tpl
Normal file
193
install/deb/templates/web/nginx/php-fpm/magento.tpl
Normal file
@@ -0,0 +1,193 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%/pub;
|
||||
index index.php;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
error_page 404 403 = /errors/404.php;
|
||||
add_header "X-UA-Compatible" "IE=Edge";
|
||||
|
||||
# PHP entry point for setup application
|
||||
location ~* ^/setup($|/) {
|
||||
root %docroot%;
|
||||
|
||||
location ~ ^/setup/index.php {
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
location ~ ^/setup/(?!pub/). {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ ^/setup/pub/ {
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
}
|
||||
}
|
||||
|
||||
# PHP entry point for update application
|
||||
location ~* ^/update($|/) {
|
||||
root %docroot%;
|
||||
|
||||
location ~ ^/update/index.php {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(/update/index.php)(/.+)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
# Deny everything but index.php
|
||||
location ~ ^/update/(?!pub/). {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ ^/update/pub/ {
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
}
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
location /pub/ {
|
||||
location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
alias %docroot%/pub/;
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
}
|
||||
|
||||
location /static/ {
|
||||
# Uncomment the following line in production mode
|
||||
# expires max;
|
||||
|
||||
# Remove signature of the static files that is used to overcome the browser cache
|
||||
location ~ ^/static/version {
|
||||
rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
|
||||
}
|
||||
|
||||
location ~* \.(ico|jpg|jpeg|png|webp|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
|
||||
add_header Cache-Control "public";
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
expires +1y;
|
||||
|
||||
if (!-f $request_filename) {
|
||||
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
|
||||
}
|
||||
}
|
||||
|
||||
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
|
||||
add_header Cache-Control "no-store";
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
expires off;
|
||||
|
||||
if (!-f $request_filename) {
|
||||
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
|
||||
}
|
||||
}
|
||||
|
||||
if (!-f $request_filename) {
|
||||
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
|
||||
}
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
}
|
||||
|
||||
location /media/ {
|
||||
try_files $uri $uri/ /get.php?$args;
|
||||
|
||||
location ~ ^/media/theme_customization/.*\.xml {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~* \.(ico|jpg|jpeg|png|webp|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
|
||||
try_files $uri $uri/ /get.php?$args;
|
||||
|
||||
add_header Cache-Control "public";
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
expires +1y;
|
||||
}
|
||||
|
||||
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
|
||||
try_files $uri $uri/ /get.php?$args;
|
||||
|
||||
add_header Cache-Control "no-store";
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
expires off;
|
||||
}
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
}
|
||||
|
||||
location /media/customer/ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /media/downloadable/ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /media/import/ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
# PHP entry point for main application
|
||||
location ~ (index|get|static|report|404|503)\.php$ {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_buffers 1024 4k;
|
||||
fastcgi_connect_timeout 600s;
|
||||
fastcgi_read_timeout 600s;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
# Banned locations (only reached if the earlier PHP entry point regexes don't match)
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
100
install/deb/templates/web/nginx/php-fpm/mautic.stpl
Normal file
100
install/deb/templates/web/nginx/php-fpm/mautic.stpl
Normal file
@@ -0,0 +1,100 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
# redirect some entire folders
|
||||
rewrite ^/(vendor|translations|build)/.* /index.php break;
|
||||
|
||||
location / {
|
||||
include %home%/%user%/conf/web/nginx.%domain%.rules.conf*;
|
||||
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to index.html
|
||||
# one option: try_files $uri $uri/ /index.php$is_args$args;
|
||||
|
||||
try_files $uri /index.php$is_args$args;
|
||||
|
||||
# Uncomment to enable naxsi on this location
|
||||
# include /etc/nginx/naxsi.rules
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# Deny everything else in /app folder except Assets folder in bundles
|
||||
location ~ /app/bundles/.*/Assets/ {
|
||||
allow all;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /app/ { deny all; }
|
||||
|
||||
# Deny everything else in /addons or /plugins folder except Assets folder in bundles
|
||||
location ~ /(addons|plugins)/.*/Assets/ {
|
||||
allow all;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
# location ~ /(addons|plugins)/ { deny all; }
|
||||
|
||||
# Deny all php files in themes folder
|
||||
location ~* ^/themes/(.*)\.php {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+.php)(/.+)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
}
|
||||
|
||||
location ~* "/\.(htaccess|htpasswd)$" {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
39
install/deb/templates/web/nginx/php-fpm/mautic.tpl
Normal file
39
install/deb/templates/web/nginx/php-fpm/mautic.tpl
Normal file
@@ -0,0 +1,39 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location / {
|
||||
rewrite ^(.*) https://%domain%$1 permanent;
|
||||
}
|
||||
|
||||
location ~* "/\.(htaccess|htpasswd)$" {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
97
install/deb/templates/web/nginx/php-fpm/modx.stpl
Normal file
97
install/deb/templates/web/nginx/php-fpm/modx.stpl
Normal file
@@ -0,0 +1,97 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /core/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location @rewrite {
|
||||
rewrite ^/(.*)$ /index.php?q=$1;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ @rewrite;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
if ($request_uri ~* "/manager/|index.php") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
|
||||
if ($http_cookie ~ SESS) {
|
||||
set $no_cache 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
85
install/deb/templates/web/nginx/php-fpm/modx.tpl
Normal file
85
install/deb/templates/web/nginx/php-fpm/modx.tpl
Normal file
@@ -0,0 +1,85 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /core/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location @rewrite {
|
||||
rewrite ^/(.*)$ /index.php?q=$1;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ @rewrite;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
if ($request_uri ~* "/manager/|index.php") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
|
||||
if ($http_cookie ~ SESS) {
|
||||
set $no_cache 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
98
install/deb/templates/web/nginx/php-fpm/moodle.stpl
Normal file
98
install/deb/templates/web/nginx/php-fpm/moodle.stpl
Normal file
@@ -0,0 +1,98 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
# Very rarely should these ever be accessed outside of your lan
|
||||
location ~* \.(txt|log)$ {
|
||||
allow 192.168.0.0/16;
|
||||
deny all;
|
||||
}
|
||||
|
||||
# No no for private
|
||||
location ~ ^/sites/.*/private/ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ \..*/.*\.php$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $fastcgi_script_name =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param PHP_VALUE open_basedir="/home/%user%/web/%domain%/private/moodledata:/home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/var/www/html:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/phppgadmin:/etc/roundcube:/var/lib/roundcube:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt";
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+\.php)($|/.*);
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
86
install/deb/templates/web/nginx/php-fpm/moodle.tpl
Normal file
86
install/deb/templates/web/nginx/php-fpm/moodle.tpl
Normal file
@@ -0,0 +1,86 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
# Very rarely should these ever be accessed outside of your lan
|
||||
location ~* \.(txt|log)$ {
|
||||
allow 192.168.0.0/16;
|
||||
deny all;
|
||||
}
|
||||
|
||||
# No no for private
|
||||
location ~ ^/sites/.*/private/ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ \..*/.*\.php$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $fastcgi_script_name =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_param PHP_VALUE open_basedir="/home/%user%/web/%domain%/private/moodledata:/home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/var/www/html:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/phppgadmin:/etc/roundcube:/var/lib/roundcube:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt";
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+\.php)($|/.*);
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
57
install/deb/templates/web/nginx/php-fpm/no-php.stpl
Normal file
57
install/deb/templates/web/nginx/php-fpm/no-php.stpl
Normal file
@@ -0,0 +1,57 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
types { } default_type "text/html";
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
46
install/deb/templates/web/nginx/php-fpm/no-php.tpl
Normal file
46
install/deb/templates/web/nginx/php-fpm/no-php.tpl
Normal file
@@ -0,0 +1,46 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
types { } default_type "text/html";
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
78
install/deb/templates/web/nginx/php-fpm/odoo.stpl
Normal file
78
install/deb/templates/web/nginx/php-fpm/odoo.stpl
Normal file
@@ -0,0 +1,78 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
|
||||
proxy_redirect off;
|
||||
|
||||
proxy_set_header Early-Data $rfc_early_data;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
proxy_connect_timeout 720;
|
||||
proxy_send_timeout 720;
|
||||
proxy_read_timeout 720;
|
||||
send_timeout 720;
|
||||
|
||||
# Allow "Well-Known URIs" as per RFC 5785
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8069;
|
||||
}
|
||||
|
||||
location /longpolling {
|
||||
proxy_pass http://127.0.0.1:8072;
|
||||
}
|
||||
|
||||
location ~* /web/static/ {
|
||||
expires 864000;
|
||||
|
||||
proxy_buffering on;
|
||||
proxy_cache_valid 200 60m;
|
||||
|
||||
proxy_pass http://127.0.0.1:8069;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
66
install/deb/templates/web/nginx/php-fpm/odoo.tpl
Normal file
66
install/deb/templates/web/nginx/php-fpm/odoo.tpl
Normal file
@@ -0,0 +1,66 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
|
||||
proxy_redirect off;
|
||||
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
proxy_connect_timeout 720;
|
||||
proxy_send_timeout 720;
|
||||
proxy_read_timeout 720;
|
||||
send_timeout 720;
|
||||
|
||||
# Allow "Well-Known URIs" as per RFC 5785
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8069;
|
||||
}
|
||||
|
||||
location /longpolling {
|
||||
proxy_pass http://127.0.0.1:8072;
|
||||
}
|
||||
|
||||
location ~* /web/static/ {
|
||||
expires 864000;
|
||||
|
||||
proxy_buffering on;
|
||||
proxy_cache_valid 200 60m;
|
||||
|
||||
proxy_pass http://127.0.0.1:8069;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
78
install/deb/templates/web/nginx/php-fpm/opencart.stpl
Normal file
78
install/deb/templates/web/nginx/php-fpm/opencart.stpl
Normal file
@@ -0,0 +1,78 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ @opencart;
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location @opencart {
|
||||
rewrite ^/(.+)$ /index.php?_route_=$1 last;
|
||||
}
|
||||
|
||||
location /storage/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
66
install/deb/templates/web/nginx/php-fpm/opencart.tpl
Normal file
66
install/deb/templates/web/nginx/php-fpm/opencart.tpl
Normal file
@@ -0,0 +1,66 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ @opencart;
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location @opencart {
|
||||
rewrite ^/(.+)$ /index.php?_route_=$1 last;
|
||||
}
|
||||
|
||||
location /storage/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
56
install/deb/templates/web/nginx/php-fpm/openproject.stpl
Normal file
56
install/deb/templates/web/nginx/php-fpm/openproject.stpl
Normal file
@@ -0,0 +1,56 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Early-Data $rfc_early_data;
|
||||
proxy_set_header X-Forwarded-Port 443;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
proxy_pass http://127.0.0.1:6000;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
42
install/deb/templates/web/nginx/php-fpm/openproject.tpl
Normal file
42
install/deb/templates/web/nginx/php-fpm/openproject.tpl
Normal file
@@ -0,0 +1,42 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
proxy_pass http://127.0.0.1:6000;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
105
install/deb/templates/web/nginx/php-fpm/osticket.stpl
Normal file
105
install/deb/templates/web/nginx/php-fpm/osticket.stpl
Normal file
@@ -0,0 +1,105 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
set $path_info "";
|
||||
|
||||
location ~ /include {
|
||||
deny all;
|
||||
return 403;
|
||||
}
|
||||
|
||||
if ($request_uri ~ "^/api(/[^\?]+)") {
|
||||
set $path_info $1;
|
||||
}
|
||||
|
||||
location ~ ^/api/(?:tickets|tasks).*$ {
|
||||
try_files $uri $uri/ /api/http.php?$query_string;
|
||||
}
|
||||
|
||||
if ($request_uri ~ "^/scp/.*\.php(/[^\?]+)") {
|
||||
set $path_info $1;
|
||||
}
|
||||
|
||||
if ($request_uri ~ "^/.*\.php(/[^\?]+)") {
|
||||
set $path_info $1;
|
||||
}
|
||||
|
||||
location ~ ^/scp/ajax.php/.*$ {
|
||||
try_files $uri $uri/ /scp/ajax.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ ^/ajax.php/.*$ {
|
||||
try_files $uri $uri/ /ajax.php?$query_string;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ index.php;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param PATH_INFO $path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
93
install/deb/templates/web/nginx/php-fpm/osticket.tpl
Normal file
93
install/deb/templates/web/nginx/php-fpm/osticket.tpl
Normal file
@@ -0,0 +1,93 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
set $path_info "";
|
||||
|
||||
location ~ /include {
|
||||
deny all;
|
||||
return 403;
|
||||
}
|
||||
|
||||
if ($request_uri ~ "^/api(/[^\?]+)") {
|
||||
set $path_info $1;
|
||||
}
|
||||
|
||||
location ~ ^/api/(?:tickets|tasks).*$ {
|
||||
try_files $uri $uri/ /api/http.php?$query_string;
|
||||
}
|
||||
|
||||
if ($request_uri ~ "^/scp/.*\.php(/[^\?]+)") {
|
||||
set $path_info $1;
|
||||
}
|
||||
|
||||
if ($request_uri ~ "^/.*\.php(/[^\?]+)") {
|
||||
set $path_info $1;
|
||||
}
|
||||
|
||||
location ~ ^/scp/ajax.php/.*$ {
|
||||
try_files $uri $uri/ /scp/ajax.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ ^/ajax.php/.*$ {
|
||||
try_files $uri $uri/ /ajax.php?$query_string;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ index.php;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param PATH_INFO $path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
103
install/deb/templates/web/nginx/php-fpm/owncloud.stpl
Normal file
103
install/deb/templates/web/nginx/php-fpm/owncloud.stpl
Normal file
@@ -0,0 +1,103 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
|
||||
rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
|
||||
rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
|
||||
|
||||
error_page 403 = /core/templates/403.php;
|
||||
error_page 404 = /core/templates/404.php;
|
||||
error_page 500 502 503 504 /error/50x.html;
|
||||
|
||||
location ~ ^/(?:\data|config|db_structure\.xml|README){
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/|file) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
# The following 2 rules are only needed with webfinger
|
||||
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
|
||||
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
|
||||
rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
|
||||
rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
|
||||
rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
|
||||
|
||||
try_files $uri $uri/ /index.php;
|
||||
|
||||
location ~ \.php(?:$|/) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
#fastcgi_param HTTPS on;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
|
||||
# Some basic cache-control for static files to be sent to the browser
|
||||
add_header Pragma public;
|
||||
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location ^~ /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
91
install/deb/templates/web/nginx/php-fpm/owncloud.tpl
Normal file
91
install/deb/templates/web/nginx/php-fpm/owncloud.tpl
Normal file
@@ -0,0 +1,91 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
|
||||
rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
|
||||
rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
|
||||
|
||||
error_page 403 = /core/templates/403.php;
|
||||
error_page 404 = /core/templates/404.php;
|
||||
error_page 500 502 503 504 /error/50x.html;
|
||||
|
||||
location ~ ^/(?:\data|config|db_structure\.xml|README){
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/|file) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
# The following 2 rules are only needed with webfinger
|
||||
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
|
||||
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
|
||||
rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
|
||||
rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
|
||||
rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
|
||||
|
||||
try_files $uri $uri/ /index.php;
|
||||
|
||||
location ~ \.php(?:$|/) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
#fastcgi_param HTTPS on;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
|
||||
# Some basic cache-control for static files to be sent to the browser
|
||||
add_header Pragma public;
|
||||
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location ^~ /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
117
install/deb/templates/web/nginx/php-fpm/phpbb.stpl
Normal file
117
install/deb/templates/web/nginx/php-fpm/phpbb.stpl
Normal file
@@ -0,0 +1,117 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Based on: https://github.com/phpbb/phpbb/blob/master/phpBB/docs/nginx.sample.conf
|
||||
location / {
|
||||
try_files $uri $uri/ @rewriteapp;
|
||||
|
||||
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)$ {
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
# Pass the php scripts to FastCGI server specified in upstream declaration.
|
||||
location ~ \.php(/|$) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
try_files $uri $uri/ /app.php$is_args$args;
|
||||
}
|
||||
|
||||
# Deny access to internal phpbb files.
|
||||
location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb(?!\w+)|store|vendor) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
}
|
||||
|
||||
location @rewriteapp {
|
||||
rewrite ^(.*)$ /app.php/$1 last;
|
||||
}
|
||||
|
||||
# Correctly pass scripts for installer
|
||||
location /install/ {
|
||||
try_files $uri $uri/ @rewrite_installapp =404;
|
||||
|
||||
# Pass the php scripts to fastcgi server specified in upstream declaration.
|
||||
location ~ \.php(/|$) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
try_files $uri $uri/ /install/app.php$is_args$args =404;
|
||||
}
|
||||
}
|
||||
|
||||
location @rewrite_installapp {
|
||||
rewrite ^(.*)$ /install/app.php/$1 last;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
104
install/deb/templates/web/nginx/php-fpm/phpbb.tpl
Normal file
104
install/deb/templates/web/nginx/php-fpm/phpbb.tpl
Normal file
@@ -0,0 +1,104 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Based on: https://github.com/phpbb/phpbb/blob/master/phpBB/docs/nginx.sample.conf
|
||||
location / {
|
||||
try_files $uri $uri/ @rewriteapp;
|
||||
|
||||
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)$ {
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
# Pass the php scripts to FastCGI server specified in upstream declaration.
|
||||
location ~ \.php(/|$) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
try_files $uri $uri/ /app.php$is_args$args;
|
||||
}
|
||||
|
||||
# Deny access to internal phpbb files.
|
||||
location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb(?!\w+)|store|vendor) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
}
|
||||
|
||||
location @rewriteapp {
|
||||
rewrite ^(.*)$ /app.php/$1 last;
|
||||
}
|
||||
|
||||
# Correctly pass scripts for installer
|
||||
location /install/ {
|
||||
try_files $uri $uri/ @rewrite_installapp =404;
|
||||
|
||||
# Pass the php scripts to fastcgi server specified in upstream declaration.
|
||||
location ~ \.php(/|$) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
try_files $uri $uri/ /install/app.php$is_args$args =404;
|
||||
}
|
||||
}
|
||||
|
||||
location @rewrite_installapp {
|
||||
rewrite ^(.*)$ /install/app.php/$1 last;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
88
install/deb/templates/web/nginx/php-fpm/piwik.stpl
Normal file
88
install/deb/templates/web/nginx/php-fpm/piwik.stpl
Normal file
@@ -0,0 +1,88 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
try_files /favicon.ico =204;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php;
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
valid_referers none blocked %domain_idn% %alias_idn%;
|
||||
|
||||
if ($invalid_referer) {
|
||||
return 444;
|
||||
}
|
||||
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~* ^/(?:index|piwik)\.php$ {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
# Any other attempt to access PHP files returns a 404.
|
||||
location ~* ^.+\.php$ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Return a 404 for all text files.
|
||||
location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
76
install/deb/templates/web/nginx/php-fpm/piwik.tpl
Normal file
76
install/deb/templates/web/nginx/php-fpm/piwik.tpl
Normal file
@@ -0,0 +1,76 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
try_files /favicon.ico =204;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php;
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
valid_referers none blocked %domain_idn% %alias_idn%;
|
||||
|
||||
if ($invalid_referer) {
|
||||
return 444;
|
||||
}
|
||||
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~* ^/(?:index|piwik)\.php$ {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
# Any other attempt to access PHP files returns a 404.
|
||||
location ~* ^.+\.php$ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Return a 404 for all text files.
|
||||
location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
154
install/deb/templates/web/nginx/php-fpm/prestashop.stpl
Normal file
154
install/deb/templates/web/nginx/php-fpm/prestashop.stpl
Normal file
@@ -0,0 +1,154 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Force pdf files to be downloaded
|
||||
location ~* \.pdf$ {
|
||||
add_header Content-Disposition Attachment;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
}
|
||||
|
||||
# Force files in upload directory to be downloaded
|
||||
location ~ ^/upload/ {
|
||||
add_header Content-Disposition Attachment;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
}
|
||||
|
||||
# [REQUIRED EDIT IF MULTILANG]
|
||||
# rewrite ^/fr$ /fr/ redirect;
|
||||
# rewrite ^/fr/(.*) /$1;
|
||||
|
||||
# Images
|
||||
rewrite ^/([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$1$2$3.jpg last;
|
||||
rewrite ^/([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$1$2$3$4.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg last;
|
||||
rewrite ^/c/([0-9]+)(-[.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+.jpg$ /img/c/$1$2$3.jpg last;
|
||||
rewrite ^/c/([a-zA-Z_-]+)(-[0-9]+)?/.+.jpg$ /img/c/$1$2.jpg last;
|
||||
|
||||
# AlphaImageLoader for IE and fancybox
|
||||
rewrite ^images_ie/?([^/]+)\.(jpe?g|png|webp|gif)$ js/jquery/plugins/fancybox/images/$1.$2 last;
|
||||
|
||||
# Web service API
|
||||
rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last;
|
||||
|
||||
# Installation sandbox
|
||||
rewrite ^(/install(?:-dev)?/sandbox)/(.*) /$1/test.php last;
|
||||
|
||||
# Source code directories
|
||||
location ~ ^/(app|bin|cache|classes|config|controllers|docs|localization|override|src|tests|tools|translations|travis-scripts|vendor|var)/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# vendor in modules directory
|
||||
location ~ ^/modules/.*/vendor/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Prevent exposing other sensitive files
|
||||
location ~ \.(yml|log|tpl|twig|sass)$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Prevent injection of php files
|
||||
location /upload {
|
||||
location ~ \.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
}
|
||||
location /img {
|
||||
location ~ \.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $fastcgi_script_name /index.php$uri&$args =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
error_page 403 /error/404.html;
|
||||
error_page 404 /index.php?controller=404;
|
||||
error_page 500 502 503 504 /error/50x.html;
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
142
install/deb/templates/web/nginx/php-fpm/prestashop.tpl
Normal file
142
install/deb/templates/web/nginx/php-fpm/prestashop.tpl
Normal file
@@ -0,0 +1,142 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Force pdf files to be downloaded
|
||||
location ~* \.pdf$ {
|
||||
add_header Content-Disposition Attachment;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
}
|
||||
|
||||
# Force files in upload directory to be downloaded
|
||||
location ~ ^/upload/ {
|
||||
add_header Content-Disposition Attachment;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
}
|
||||
|
||||
# [REQUIRED EDIT IF MULTILANG]
|
||||
# rewrite ^/fr$ /fr/ redirect;
|
||||
# rewrite ^/fr/(.*) /$1;
|
||||
|
||||
# Images
|
||||
rewrite ^/([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$1$2$3.jpg last;
|
||||
rewrite ^/([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$1$2$3$4.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg last;
|
||||
rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg last;
|
||||
rewrite ^/c/([0-9]+)(-[.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+.jpg$ /img/c/$1$2$3.jpg last;
|
||||
rewrite ^/c/([a-zA-Z_-]+)(-[0-9]+)?/.+.jpg$ /img/c/$1$2.jpg last;
|
||||
|
||||
# AlphaImageLoader for IE and fancybox
|
||||
rewrite ^images_ie/?([^/]+)\.(jpe?g|png|webp|gif)$ js/jquery/plugins/fancybox/images/$1.$2 last;
|
||||
|
||||
# Web service API
|
||||
rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last;
|
||||
|
||||
# Installation sandbox
|
||||
rewrite ^(/install(?:-dev)?/sandbox)/(.*) /$1/test.php last;
|
||||
|
||||
# Source code directories
|
||||
location ~ ^/(app|bin|cache|classes|config|controllers|docs|localization|override|src|tests|tools|translations|travis-scripts|vendor|var)/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# vendor in modules directory
|
||||
location ~ ^/modules/.*/vendor/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Prevent exposing other sensitive files
|
||||
location ~ \.(yml|log|tpl|twig|sass)$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Prevent injection of php files
|
||||
location /upload {
|
||||
location ~ \.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
}
|
||||
location /img {
|
||||
location ~ \.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $fastcgi_script_name /index.php$uri&$args =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
error_page 403 /error/404.html;
|
||||
error_page 404 /index.php?controller=404;
|
||||
error_page 500 502 503 504 /error/50x.html;
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
103
install/deb/templates/web/nginx/php-fpm/projectsend.stpl
Normal file
103
install/deb/templates/web/nginx/php-fpm/projectsend.stpl
Normal file
@@ -0,0 +1,103 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
# Add headers to serve security related headers
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Robots-Tag none;
|
||||
add_header X-Download-Options noopen;
|
||||
add_header X-Permitted-Cross-Domain-Policies none;
|
||||
add_header Referrer-Policy no-referrer;
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
# set max upload size
|
||||
client_max_body_size 512M;
|
||||
|
||||
# Disable gzip to avoid the removal of the ETag header
|
||||
gzip off;
|
||||
|
||||
# Uncomment if your server is build with the ngx_pagespeed module
|
||||
# This module is currently not supported.
|
||||
#pagespeed off;
|
||||
|
||||
error_page 403 /core/templates/403.php;
|
||||
error_page 404 /core/templates/404.php;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $fastcgi_script_name =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param front_controller_active true;
|
||||
# Avoid sending the security headers twice
|
||||
fastcgi_param modHeadersAvailable true;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_request_buffering off;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
|
||||
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
|
||||
|
||||
}
|
||||
|
||||
location ~* \.(?:svg|gif|png|webp|html|ttf|woff|ico|jpg|jpeg)$ {
|
||||
try_files $uri /index.php$uri$is_args$args;
|
||||
|
||||
# Optional: Don't log access to other assets
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
89
install/deb/templates/web/nginx/php-fpm/projectsend.tpl
Normal file
89
install/deb/templates/web/nginx/php-fpm/projectsend.tpl
Normal file
@@ -0,0 +1,89 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
# Add headers to serve security related headers
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Robots-Tag none;
|
||||
add_header X-Download-Options noopen;
|
||||
add_header X-Permitted-Cross-Domain-Policies none;
|
||||
add_header Referrer-Policy no-referrer;
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
client_max_body_size 512M;
|
||||
|
||||
# Disable gzip to avoid the removal of the ETag header
|
||||
gzip off;
|
||||
|
||||
# Uncomment if your server is build with the ngx_pagespeed module
|
||||
# This module is currently not supported.
|
||||
#pagespeed off;
|
||||
|
||||
error_page 403 /core/templates/403.php;
|
||||
error_page 404 /core/templates/404.php;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $fastcgi_script_name =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_param front_controller_active true;
|
||||
# Avoid sending the security headers twice
|
||||
fastcgi_param modHeadersAvailable true;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_request_buffering off;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
|
||||
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
|
||||
|
||||
}
|
||||
|
||||
location ~* \.(?:svg|gif|png|webp|html|ttf|woff|ico|jpg|jpeg)$ {
|
||||
try_files $uri /index.php$uri$is_args$args;
|
||||
# Optional: Don't log access to other assets
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
78
install/deb/templates/web/nginx/php-fpm/pyrocms.stpl
Normal file
78
install/deb/templates/web/nginx/php-fpm/pyrocms.stpl
Normal file
@@ -0,0 +1,78 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %sdocroot%/public;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /installer {
|
||||
try_files $uri $uri/ /installer/index.php?$query_string;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php;
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
#location ~ /\. { access_log off; log_not_found off; deny all; }
|
||||
location ~ ~$ { access_log off; log_not_found off; deny all; }
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
66
install/deb/templates/web/nginx/php-fpm/pyrocms.tpl
Normal file
66
install/deb/templates/web/nginx/php-fpm/pyrocms.tpl
Normal file
@@ -0,0 +1,66 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%/public;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location /installer {
|
||||
try_files $uri $uri/ /installer/index.php?$query_string;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php;
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
#location ~ /\. { access_log off; log_not_found off; deny all; }
|
||||
location ~ ~$ { access_log off; log_not_found off; deny all; }
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
104
install/deb/templates/web/nginx/php-fpm/sendy.stpl
Normal file
104
install/deb/templates/web/nginx/php-fpm/sendy.stpl
Normal file
@@ -0,0 +1,104 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
if (!-f $request_filename) {
|
||||
rewrite ^/([a-zA-Z0-9-]+)$ /$1.php last;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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|pdf)$ {
|
||||
expires 1d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
location /l/ {
|
||||
rewrite ^/l/([a-zA-Z0-9/]+)$ /l.php?i=$1 last;
|
||||
}
|
||||
|
||||
location /t/ {
|
||||
rewrite ^/t/([a-zA-Z0-9/]+)$ /t.php?i=$1 last;
|
||||
}
|
||||
|
||||
location /w/ {
|
||||
rewrite ^/w/([a-zA-Z0-9/]+)$ /w.php?i=$1 last;
|
||||
}
|
||||
|
||||
location /unsubscribe/ {
|
||||
rewrite ^/unsubscribe/(.*)$ /unsubscribe.php?i=$1 last;
|
||||
}
|
||||
|
||||
location /subscribe/ {
|
||||
rewrite ^/subscribe/(.*)$ /subscribe.php?i=$1 last;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
92
install/deb/templates/web/nginx/php-fpm/sendy.tpl
Normal file
92
install/deb/templates/web/nginx/php-fpm/sendy.tpl
Normal file
@@ -0,0 +1,92 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
if (!-f $request_filename) {
|
||||
rewrite ^/([a-zA-Z0-9-]+)$ /$1.php last;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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|pdf)$ {
|
||||
expires 1d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
location /l/ {
|
||||
rewrite ^/l/([a-zA-Z0-9/]+)$ /l.php?i=$1 last;
|
||||
}
|
||||
|
||||
location /t/ {
|
||||
rewrite ^/t/([a-zA-Z0-9/]+)$ /t.php?i=$1 last;
|
||||
}
|
||||
|
||||
location /w/ {
|
||||
rewrite ^/w/([a-zA-Z0-9/]+)$ /w.php?i=$1 last;
|
||||
}
|
||||
|
||||
location /unsubscribe/ {
|
||||
rewrite ^/unsubscribe/(.*)$ /unsubscribe.php?i=$1 last;
|
||||
}
|
||||
|
||||
location /subscribe/ {
|
||||
rewrite ^/subscribe/(.*)$ /subscribe.php?i=$1 last;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
46
install/deb/templates/web/nginx/php-fpm/suspended.stpl
Normal file
46
install/deb/templates/web/nginx/php-fpm/suspended.stpl
Normal file
@@ -0,0 +1,46 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %sdocroot%;
|
||||
index index.html;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/|file) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html;
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
37
install/deb/templates/web/nginx/php-fpm/suspended.tpl
Normal file
37
install/deb/templates/web/nginx/php-fpm/suspended.tpl
Normal file
@@ -0,0 +1,37 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
index index.html;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location ~ /\.(?!well-known\/|file) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html;
|
||||
|
||||
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
|
||||
expires max;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
111
install/deb/templates/web/nginx/php-fpm/symfony2-3.stpl
Normal file
111
install/deb/templates/web/nginx/php-fpm/symfony2-3.stpl
Normal file
@@ -0,0 +1,111 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %sdocroot%/web;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
# try to serve file directly, fallback to app.php
|
||||
try_files $uri /app.php$is_args$args;
|
||||
}
|
||||
|
||||
# DEV
|
||||
# This rule should only be placed on your development environment
|
||||
# In production, don't include this and don't deploy app_dev.php or config.php
|
||||
location ~ ^/(app_dev|config)\.php(/|$) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
# When you are using symlinks to link the document root to the
|
||||
# current version of your application, you should pass the real
|
||||
# application path instead of the path to the symlink to PHP
|
||||
# FPM.
|
||||
# Otherwise, PHP's OPcache may not properly detect changes to
|
||||
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
|
||||
# for more information).
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
# PROD
|
||||
location ~ ^/app\.php(/|$) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
# When you are using symlinks to link the document root to the
|
||||
# current version of your application, you should pass the real
|
||||
# application path instead of the path to the symlink to PHP
|
||||
# FPM.
|
||||
# Otherwise, PHP's OPcache may not properly detect changes to
|
||||
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
|
||||
# for more information).
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
# Prevents URIs that include the front controller. This will 404:
|
||||
# http://domain.tld/app.php/some-path
|
||||
# Remove the internal directive to allow URIs like this
|
||||
internal;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
98
install/deb/templates/web/nginx/php-fpm/symfony2-3.tpl
Normal file
98
install/deb/templates/web/nginx/php-fpm/symfony2-3.tpl
Normal file
@@ -0,0 +1,98 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%/web;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
# try to serve file directly, fallback to app.php
|
||||
try_files $uri /app.php$is_args$args;
|
||||
}
|
||||
|
||||
# DEV
|
||||
# This rule should only be placed on your development environment
|
||||
# In production, don't include this and don't deploy app_dev.php or config.php
|
||||
location ~ ^/(app_dev|config)\.php(/|$) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
# When you are using symlinks to link the document root to the
|
||||
# current version of your application, you should pass the real
|
||||
# application path instead of the path to the symlink to PHP
|
||||
# FPM.
|
||||
# Otherwise, PHP's OPcache may not properly detect changes to
|
||||
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
|
||||
# for more information).
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
# PROD
|
||||
location ~ ^/app\.php(/|$) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
# When you are using symlinks to link the document root to the
|
||||
# current version of your application, you should pass the real
|
||||
# application path instead of the path to the symlink to PHP
|
||||
# FPM.
|
||||
# Otherwise, PHP's OPcache may not properly detect changes to
|
||||
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
|
||||
# for more information).
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
# Prevents URIs that include the front controller. This will 404:
|
||||
# http://domain.tld/app.php/some-path
|
||||
# Remove the internal directive to allow URIs like this
|
||||
internal;
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
80
install/deb/templates/web/nginx/php-fpm/symfony4-5.stpl
Normal file
80
install/deb/templates/web/nginx/php-fpm/symfony4-5.stpl
Normal file
@@ -0,0 +1,80 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %sdocroot%/public;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
68
install/deb/templates/web/nginx/php-fpm/symfony4-5.tpl
Normal file
68
install/deb/templates/web/nginx/php-fpm/symfony4-5.tpl
Normal file
@@ -0,0 +1,68 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%/public;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
102
install/deb/templates/web/nginx/php-fpm/thunder.stpl
Normal file
102
install/deb/templates/web/nginx/php-fpm/thunder.stpl
Normal file
@@ -0,0 +1,102 @@
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %sdocroot%/docroot;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/private/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
||||
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)$ {
|
||||
try_files $uri @rewrite;
|
||||
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ \..*/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ ^/sites/[^/]+/files/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/files/styles/ {
|
||||
try_files $uri @rewrite;
|
||||
}
|
||||
}
|
||||
|
||||
location @rewrite {
|
||||
rewrite ^/(.*)$ /index.php?q=$1;
|
||||
}
|
||||
|
||||
rewrite ^/index.php/(.*) /$1 permanent;
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
90
install/deb/templates/web/nginx/php-fpm/thunder.tpl
Normal file
90
install/deb/templates/web/nginx/php-fpm/thunder.tpl
Normal file
@@ -0,0 +1,90 @@
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%/docroot;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/private/ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
||||
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)$ {
|
||||
try_files $uri @rewrite;
|
||||
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~ \..*/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ ^/sites/[^/]+/files/.*\.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
}
|
||||
|
||||
location ~ ^/sites/.*/files/styles/ {
|
||||
try_files $uri @rewrite;
|
||||
}
|
||||
}
|
||||
|
||||
location @rewrite {
|
||||
rewrite ^/(.*)$ /index.php?q=$1;
|
||||
}
|
||||
|
||||
rewrite ^/index.php/(.*) /$1 permanent;
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
93
install/deb/templates/web/nginx/php-fpm/wordpress.stpl
Normal file
93
install/deb/templates/web/nginx/php-fpm/wordpress.stpl
Normal file
@@ -0,0 +1,93 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~* /(?:uploads|files)/.*.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
if ($request_uri ~* "/wp-admin/|/wp-json/|wp-.*.php|xmlrpc.php|index.php|/store.*|/cart.*|/my-account.*|/checkout.*") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
|
||||
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in|woocommerce_items_in_cart|woocommerce_cart_hash|PHPSESSID") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
81
install/deb/templates/web/nginx/php-fpm/wordpress.tpl
Normal file
81
install/deb/templates/web/nginx/php-fpm/wordpress.tpl
Normal file
@@ -0,0 +1,81 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~* /(?:uploads|files)/.*.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
if ($request_uri ~* "/wp-admin/|/wp-json/|wp-.*.php|xmlrpc.php|index.php|/store.*|/cart.*|/my-account.*|/checkout.*") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
|
||||
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in|woocommerce_items_in_cart|woocommerce_cart_hash|PHPSESSID") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
100
install/deb/templates/web/nginx/php-fpm/wordpress_mu_subdir.stpl
Normal file
100
install/deb/templates/web/nginx/php-fpm/wordpress_mu_subdir.stpl
Normal file
@@ -0,0 +1,100 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
# Rewrite requests to /wp-.* on subdirectory installs.
|
||||
if (!-e $request_filename) {
|
||||
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
||||
rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
|
||||
rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~* /(?:uploads|files)/.*.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
if ($request_uri ~* "/wp-admin/|/wp-json/|wp-.*.php|xmlrpc.php|index.php|/store.*|/cart.*|/my-account.*|/checkout.*") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
|
||||
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in|woocommerce_items_in_cart|woocommerce_cart_hash|PHPSESSID") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
#=========================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
# https://hestiacp.com/docs/server-administration/web-templates.html #
|
||||
#=========================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
# Rewrite requests to /wp-.* on subdirectory installs.
|
||||
if (!-e $request_filename) {
|
||||
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
||||
rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
|
||||
rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known\/) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
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)$ {
|
||||
expires 30d;
|
||||
fastcgi_hide_header "Set-Cookie";
|
||||
}
|
||||
|
||||
location ~* /(?:uploads|files)/.*.php$ {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
if ($request_uri ~* "/wp-admin/|/wp-json/|wp-.*.php|xmlrpc.php|index.php|/store.*|/cart.*|/my-account.*|/checkout.*") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
|
||||
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in|woocommerce_items_in_cart|woocommerce_cart_hash|PHPSESSID") {
|
||||
set $no_cache 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
||||
location /vstats/ {
|
||||
alias %home%/%user%/web/%domain%/stats/;
|
||||
include %home%/%user%/web/%domain%/stats/auth.conf*;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/phpmyadmin.inc*;
|
||||
include /etc/nginx/conf.d/phppgadmin.inc*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
43
install/deb/templates/web/nginx/php-fpm/yourls.stpl
Normal file
43
install/deb/templates/web/nginx/php-fpm/yourls.stpl
Normal file
@@ -0,0 +1,43 @@
|
||||
#=======================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
#=======================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_ssl_port% ssl http2;
|
||||
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_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# TLS 1.3 0-RTT anti-replay
|
||||
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
||||
if ($anti_replay = 425) { return 425; }
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
|
||||
# Rewrites
|
||||
location / {
|
||||
try_files $uri $uri/ /yourls-loader.php$is_args$args;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
34
install/deb/templates/web/nginx/php-fpm/yourls.tpl
Normal file
34
install/deb/templates/web/nginx/php-fpm/yourls.tpl
Normal file
@@ -0,0 +1,34 @@
|
||||
#=======================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
#=======================================================================#
|
||||
|
||||
server {
|
||||
listen %ip%:%web_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
root %docroot%;
|
||||
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;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
# Rewrites
|
||||
location / {
|
||||
try_files $uri $uri/ /yourls-loader.php$is_args$args;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
Reference in New Issue
Block a user