-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds support: * HTTPs (using self-signed for testing purposes) * Basic authentication This is mostly for dev/testing purposes.
- Loading branch information
Showing
4 changed files
with
52 additions
and
21 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.* | ||
!.github/ | ||
!.github/* |
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
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,22 +1,42 @@ | ||
server { | ||
add_header 'Access-Control-Allow-Origin' '*'; | ||
listen 80; | ||
server_name www.datahangar.io; | ||
|
||
location /rest { | ||
proxy_pass http://10.107.110.210; | ||
proxy_redirect off; | ||
proxy_set_header Host $host; | ||
} | ||
|
||
location /turnilo { | ||
proxy_pass http://10.107.110.210; | ||
proxy_redirect off; | ||
proxy_set_header Host $host; | ||
} | ||
|
||
location / { | ||
autoindex on; | ||
root /usr/share/nginx/html/datahangar/; | ||
} | ||
#HTTP to HTTPs | ||
listen 80 default_server; | ||
server_name _; | ||
return 301 https://$host$request_uri; | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
server_name www.datahangar.io; | ||
|
||
add_header 'Access-Control-Allow-Origin' '*'; | ||
|
||
# SSL block | ||
ssl_certificate /etc/nginx/certs/frontend.crt; | ||
ssl_certificate_key /etc/nginx/certs/frontend.key; | ||
|
||
# Other SSL configurations (optional) | ||
ssl_protocols TLSv1.2 TLSv1.3; | ||
ssl_prefer_server_ciphers on; | ||
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:...'; | ||
|
||
auth_basic "Restricted Content"; | ||
auth_basic_user_file /etc/nginx/htpasswd/htpasswd; | ||
|
||
location /rest { | ||
proxy_pass http://__REST_IP__; | ||
proxy_redirect off; | ||
proxy_set_header Host $host; | ||
} | ||
|
||
location /turnilo { | ||
proxy_pass http://__TURNILO_IP__:9090; | ||
proxy_redirect off; | ||
proxy_set_header Host $host; | ||
} | ||
|
||
location / { | ||
autoindex on; | ||
root /usr/share/nginx/html/datahangar/; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
user1:$2y$05$GdG/X5qtHXOPxRo80mvsqO2ZTsXj2WHCzF72hdfpD8MeOl.hwKbMy |