You've already forked dockerfiles
mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-08-06 22:23:10 +02:00
add dsvpn
This commit is contained in:
22
nginx-sso/nginx/sites-enabled/000-nginx-sso.conf
Normal file
22
nginx-sso/nginx/sites-enabled/000-nginx-sso.conf
Normal file
@ -0,0 +1,22 @@
|
||||
# Redirect all requests to this server to https
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name _;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name login.yourdomain.com;
|
||||
|
||||
access_log /var/log/nginx/login.yourdomain.com_access.log;
|
||||
error_log /var/log/nginx/login.yourdomain.com_error.log;
|
||||
|
||||
include conf.d/include/ssl.inc;
|
||||
|
||||
location / {
|
||||
proxy_pass http://172.17.0.1:8082/;
|
||||
}
|
||||
}
|
31
nginx-sso/nginx/sites-enabled/hass.yourdomain.com.conf
Normal file
31
nginx-sso/nginx/sites-enabled/hass.yourdomain.com.conf
Normal file
@ -0,0 +1,31 @@
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name hass.yourdomain.com;
|
||||
|
||||
access_log /var/log/nginx/hass.yourdomain.com_access.log;
|
||||
error_log /var/log/nginx/hass.yourdomain.com_error.log;
|
||||
|
||||
include conf.d/include/ssl.inc;
|
||||
include conf.d/include/sso.inc;
|
||||
|
||||
location / {
|
||||
# Automatically renew SSO cookie on request
|
||||
auth_request_set $cookie $upstream_http_set_cookie;
|
||||
add_header Set-Cookie $cookie;
|
||||
|
||||
proxy_pass http://172.17.0.1:8123/;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_redirect http:// https://;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
}
|
||||
}
|
19
nginx-sso/nginx/sites-enabled/portainer.yourdomain.com.conf
Normal file
19
nginx-sso/nginx/sites-enabled/portainer.yourdomain.com.conf
Normal file
@ -0,0 +1,19 @@
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name portainer.yourdomain.com;
|
||||
|
||||
access_log /var/log/nginx/portainer.yourdomain.com_access.log;
|
||||
error_log /var/log/nginx/portainer.yourdomain.com_error.log;
|
||||
|
||||
include conf.d/include/ssl.inc;
|
||||
include conf.d/include/sso.inc;
|
||||
|
||||
location / {
|
||||
# Automatically renew SSO cookie on request
|
||||
auth_request_set $cookie $upstream_http_set_cookie;
|
||||
add_header Set-Cookie $cookie;
|
||||
|
||||
proxy_pass http://172.17.0.1:9000/;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user