Skip to content

Commit 032eebb

Browse files
committed
add chevereto imagehosting template (tpl, stpl)
1 parent 52f2f62 commit 032eebb

File tree

2 files changed

+169
-0
lines changed

2 files changed

+169
-0
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#=======================================================================#
2+
# Default Web Domain Template #
3+
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
4+
#=======================================================================#
5+
6+
server {
7+
listen %ip%:%web_ssl_port% ssl http2;
8+
server_name %domain_idn% %alias_idn%;
9+
root %docroot%;
10+
index index.php index.html index.htm;
11+
access_log /var/log/nginx/domains/%domain%.log combined;
12+
access_log /var/log/nginx/domains/%domain%.bytes bytes;
13+
error_log /var/log/nginx/domains/%domain%.error.log error;
14+
15+
ssl_certificate %ssl_pem%;
16+
ssl_certificate_key %ssl_key%;
17+
ssl_stapling on;
18+
ssl_stapling_verify on;
19+
20+
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
21+
22+
client_max_body_size 1G;
23+
client_body_buffer_size 1024k;
24+
25+
location = /favicon.ico {
26+
log_not_found off;
27+
access_log off;
28+
}
29+
30+
location = /robots.txt {
31+
allow all;
32+
log_not_found off;
33+
access_log off;
34+
}
35+
36+
location ~ /\.(?!well-known\/) {
37+
deny all;
38+
return 404;
39+
}
40+
41+
location ~* /(app|content|lib)/.*\.(po|php|lock|sql)$ {
42+
deny all;
43+
}
44+
45+
location ~* /.*\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js) {
46+
add_header Access-Control-Allow-Origin "*";
47+
}
48+
49+
location ^~ /images/ {
50+
location ~* (jpe?g|png|gif) {
51+
log_not_found off;
52+
error_page 404 /content/images/system/default/404.gif;
53+
}
54+
return 403;
55+
}
56+
57+
location / {
58+
try_files $uri $uri/ /index.php?$args;
59+
60+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
61+
expires 30d;
62+
fastcgi_hide_header "Set-Cookie";
63+
}
64+
65+
location ~ [^/]\.php(/|$) {
66+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
67+
try_files $uri =404;
68+
fastcgi_pass %backend_lsnr%;
69+
fastcgi_index index.php;
70+
include /etc/nginx/fastcgi_params;
71+
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
72+
}
73+
}
74+
75+
location /error/ {
76+
alias %home%/%user%/web/%domain%/document_errors/;
77+
}
78+
79+
location /vstats/ {
80+
alias %home%/%user%/web/%domain%/stats/;
81+
include %home%/%user%/web/%domain%/stats/auth.conf*;
82+
}
83+
84+
include /etc/nginx/conf.d/phpmyadmin.inc*;
85+
include /etc/nginx/conf.d/phppgadmin.inc*;
86+
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
87+
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#=======================================================================#
2+
# Default Web Domain Template #
3+
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
4+
#=======================================================================#
5+
6+
server {
7+
listen %ip%:%web_port%;
8+
server_name %domain_idn% %alias_idn%;
9+
root %docroot%;
10+
index index.php index.html index.htm;
11+
access_log /var/log/nginx/domains/%domain%.log combined;
12+
access_log /var/log/nginx/domains/%domain%.bytes bytes;
13+
error_log /var/log/nginx/domains/%domain%.error.log error;
14+
15+
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
16+
17+
client_max_body_size 1G;
18+
client_body_buffer_size 1024k;
19+
20+
location = /favicon.ico {
21+
log_not_found off;
22+
access_log off;
23+
}
24+
25+
location = /robots.txt {
26+
allow all;
27+
log_not_found off;
28+
access_log off;
29+
}
30+
31+
location ~ /\.(?!well-known\/) {
32+
deny all;
33+
return 404;
34+
}
35+
36+
location ~* /(app|content|lib)/.*\.(po|php|lock|sql)$ {
37+
deny all;
38+
}
39+
40+
location ~* /.*\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js) {
41+
add_header Access-Control-Allow-Origin "*";
42+
}
43+
44+
location ^~ /images/ {
45+
location ~* (jpe?g|png|gif) {
46+
log_not_found off;
47+
error_page 404 /content/images/system/default/404.gif;
48+
}
49+
return 403;
50+
}
51+
52+
location / {
53+
try_files $uri $uri/ /index.php?$args;
54+
55+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
56+
expires 30d;
57+
fastcgi_hide_header "Set-Cookie";
58+
}
59+
60+
location ~ [^/]\.php(/|$) {
61+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
62+
try_files $uri =404;
63+
fastcgi_pass %backend_lsnr%;
64+
fastcgi_index index.php;
65+
include /etc/nginx/fastcgi_params;
66+
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
67+
}
68+
}
69+
70+
location /error/ {
71+
alias %home%/%user%/web/%domain%/document_errors/;
72+
}
73+
74+
location /vstats/ {
75+
alias %home%/%user%/web/%domain%/stats/;
76+
include %home%/%user%/web/%domain%/stats/auth.conf*;
77+
}
78+
79+
include /etc/nginx/conf.d/phpmyadmin.inc*;
80+
include /etc/nginx/conf.d/phppgadmin.inc*;
81+
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
82+
}

0 commit comments

Comments
 (0)