update
This commit is contained in:
parent
3e4c47d001
commit
554f241eb4
2 changed files with 88 additions and 0 deletions
45
nginx/gitbucket.stpl
Normal file
45
nginx/gitbucket.stpl
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
#=======================================================================#
|
||||||
|
# Default Web Domain Template #
|
||||||
|
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||||
|
#=======================================================================#
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen %ip%:%proxy_ssl_port% ssl http2;
|
||||||
|
listen [::]:%proxy_ssl_port% ssl http2;
|
||||||
|
server_name %domain_idn% %alias_idn%;
|
||||||
|
ssl_certificate %ssl_pem%;
|
||||||
|
ssl_certificate_key %ssl_key%;
|
||||||
|
ssl_stapling on;
|
||||||
|
ssl_stapling_verify on;
|
||||||
|
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
||||||
|
|
||||||
|
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://127.0.0.1:2080;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_connect_timeout 150;
|
||||||
|
proxy_send_timeout 100;
|
||||||
|
proxy_read_timeout 100;
|
||||||
|
proxy_buffers 4 32k;
|
||||||
|
client_max_body_size 500m; # Big number is we can post big commits.
|
||||||
|
client_body_buffer_size 128k;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /error/ {
|
||||||
|
alias %home%/%user%/web/%domain%/document_errors/;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
location ~ /\.ht {return 404;}
|
||||||
|
location ~ /\.svn/ {return 404;}
|
||||||
|
location ~ /\.git/ {return 404;}
|
||||||
|
location ~ /\.hg/ {return 404;}
|
||||||
|
location ~ /\.bzr/ {return 404;}
|
||||||
|
|
||||||
|
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||||
|
}
|
||||||
|
|
||||||
43
nginx/gitbucket.tpl
Normal file
43
nginx/gitbucket.tpl
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%:%proxy_port% ;
|
||||||
|
listen [::]:%proxy_port%;
|
||||||
|
server_name %domain_idn% %alias_idn%;
|
||||||
|
|
||||||
|
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
||||||
|
|
||||||
|
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://127.0.0.1:8010;
|
||||||
|
location ~* ^.+\.(%proxy_extentions%)$ {
|
||||||
|
root %sdocroot%;
|
||||||
|
access_log /var/log/%web_system%/domains/%domain%.log combined;
|
||||||
|
access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
|
||||||
|
expires max;
|
||||||
|
try_files $uri @fallback;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
location /error/ {
|
||||||
|
alias %home%/%user%/web/%domain%/document_errors/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location @fallback {
|
||||||
|
proxy_pass http://127.0.0.1:8010;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /\.ht {return 404;}
|
||||||
|
location ~ /\.svn/ {return 404;}
|
||||||
|
location ~ /\.git/ {return 404;}
|
||||||
|
location ~ /\.hg/ {return 404;}
|
||||||
|
location ~ /\.bzr/ {return 404;}
|
||||||
|
|
||||||
|
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue