generated from YunoHost/example_ynh
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sylvain
committed
Jun 16, 2024
1 parent
2f63fa9
commit 4c27987
Showing
1 changed file
with
24 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
location __PATH__/ { | ||
|
||
proxy_pass http://127.0.0.1:__PORT__; | ||
proxy_redirect off; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Host $server_name; | ||
client_max_body_size 500M; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_pass http://127.0.0.1:__PORT__; | ||
|
||
# allow large file uploads | ||
client_max_body_size 50G; | ||
client_body_timeout 600s; | ||
client_body_buffer_size 512k; | ||
|
||
# Set headers | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_set_header X-Forwarded-Host $server_name; | ||
|
||
# enable websockets: http://nginx.org/en/docs/http/websocket.html | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_redirect off; | ||
|
||
# set timeout | ||
proxy_read_timeout 600s; | ||
proxy_send_timeout 600s; | ||
send_timeout 600s; | ||
} |