1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/minio_ynh.git synced 2024-09-03 19:46:18 +02:00

Update nginx conf

To have server working, not only console !
This commit is contained in:
Limezy 2022-03-26 21:51:16 +07:00
parent 30fd145a50
commit e3c77dd4b5
2 changed files with 34 additions and 3 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.DS_Store

View file

@ -1,7 +1,12 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
rewrite ^$ /;
location ~ ^(/api|/login|/styles|/static|/manifest.json|/$) {
proxy_pass http://127.0.0.1:__CONSOLE_PORT__/;
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://127.0.0.1:__CONSOLE_PORT__;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_cache_bypass $http_upgrade;
@ -14,4 +19,28 @@ location __PATH__/ {
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;
}
location ~ / {
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://127.0.0.1:__PORT__;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_cache_bypass $http_upgrade;
proxy_ignore_client_abort on;
client_max_body_size 200M;
# forward headers
proxy_buffering off;
proxy_set_header Host $http_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;
}