Skip to content

Commit 6e3c54a

Browse files
authored
fix gitea template (hestiacp#3650)
1 parent 7f966da commit 6e3c54a

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

install/deb/templates/web/nginx/php-fpm/gitea.stpl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,23 @@ server {
2121
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
2222

2323
location / {
24+
client_max_body_size 512M;
2425
proxy_pass http://localhost:3000;
26+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
27+
proxy_set_header X-Real-IP $remote_addr;
28+
proxy_set_header Host $http_host;
29+
proxy_set_header X-Forwarded-Proto $scheme;
30+
proxy_max_temp_file_size 0;
31+
proxy_redirect off;
32+
proxy_read_timeout 120;
2533
}
2634

2735
location /error/ {
2836
alias %home%/%user%/web/%domain%/document_errors/;
2937
}
3038

31-
location ~ /\.(?!well-known\/) {
32-
deny all;
33-
return 404;
39+
location ~ /.well-known {
40+
allow all;
3441
}
3542

3643
location /vstats/ {

install/deb/templates/web/nginx/php-fpm/gitea.tpl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,23 @@ server {
1616
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
1717
1818
location / {
19+
client_max_body_size 512M;
1920
proxy_pass http://localhost:3000;
21+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
22+
proxy_set_header X-Real-IP $remote_addr;
23+
proxy_set_header Host $http_host;
24+
proxy_set_header X-Forwarded-Proto $scheme;
25+
proxy_max_temp_file_size 0;
26+
proxy_redirect off;
27+
proxy_read_timeout 120;
2028
}
2129

2230
location /error/ {
2331
alias %home%/%user%/web/%domain%/document_errors/;
2432
}
2533

26-
location ~ /\.(?!well-known\/) {
27-
deny all;
28-
return 404;
34+
location ~ /.well-known {
35+
allow all;
2936
}
3037

3138
location /vstats/ {

0 commit comments

Comments
 (0)