Prepare isolated VPS UAT deployment bundle
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# Do not enable this file until DNS, origin certificates, and private upstream
|
||||
# checks are complete. Adapt certificate/include paths to the VPS conventions.
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name laikapstak.li auth.laikapstak.li;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name auth.laikapstak.li;
|
||||
|
||||
ssl_certificate /etc/nginx/tls/laikapstak.li/origin.pem;
|
||||
ssl_certificate_key /etc/nginx/tls/laikapstak.li/origin.key;
|
||||
|
||||
location / {
|
||||
include /etc/nginx/snippets/weathertool-proxy.conf;
|
||||
proxy_pass http://127.0.0.1:9091;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name laikapstak.li;
|
||||
|
||||
ssl_certificate /etc/nginx/tls/laikapstak.li/origin.pem;
|
||||
ssl_certificate_key /etc/nginx/tls/laikapstak.li/origin.key;
|
||||
|
||||
# Start short during UAT. Increase only after TLS behavior is proven.
|
||||
add_header Strict-Transport-Security "max-age=3600" always;
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
add_header Referrer-Policy no-referrer always;
|
||||
|
||||
include /etc/nginx/snippets/weathertool-authelia-location.conf;
|
||||
|
||||
location / {
|
||||
include /etc/nginx/snippets/weathertool-proxy.conf;
|
||||
include /etc/nginx/snippets/weathertool-authelia-authrequest.conf;
|
||||
proxy_pass http://127.0.0.1:8002;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
auth_request /internal/authelia/authz;
|
||||
|
||||
auth_request_set $user $upstream_http_remote_user;
|
||||
auth_request_set $groups $upstream_http_remote_groups;
|
||||
auth_request_set $name $upstream_http_remote_name;
|
||||
auth_request_set $email $upstream_http_remote_email;
|
||||
auth_request_set $redirection_url $upstream_http_location;
|
||||
|
||||
proxy_set_header Remote-User $user;
|
||||
proxy_set_header Remote-Groups $groups;
|
||||
proxy_set_header Remote-Name $name;
|
||||
proxy_set_header Remote-Email $email;
|
||||
|
||||
error_page 401 =302 $redirection_url;
|
||||
@@ -0,0 +1,25 @@
|
||||
set $upstream_authelia http://127.0.0.1:9091/api/authz/auth-request;
|
||||
|
||||
location /internal/authelia/authz {
|
||||
internal;
|
||||
proxy_pass $upstream_authelia;
|
||||
|
||||
proxy_set_header X-Original-Method $request_method;
|
||||
proxy_set_header X-Original-URL $scheme://$host$request_uri;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Content-Length "";
|
||||
proxy_set_header Connection "";
|
||||
|
||||
proxy_pass_request_body off;
|
||||
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
|
||||
proxy_redirect http:// $scheme://;
|
||||
proxy_http_version 1.1;
|
||||
proxy_cache_bypass $cookie_weathertool_session;
|
||||
proxy_no_cache $cookie_weathertool_session;
|
||||
proxy_buffers 4 32k;
|
||||
client_body_buffer_size 128k;
|
||||
send_timeout 5m;
|
||||
proxy_read_timeout 240s;
|
||||
proxy_send_timeout 240s;
|
||||
proxy_connect_timeout 240s;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Original-URL $scheme://$host$request_uri;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-URI $request_uri;
|
||||
proxy_set_header X-Forwarded-Ssl on;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_connect_timeout 15s;
|
||||
proxy_read_timeout 240s;
|
||||
proxy_send_timeout 240s;
|
||||
Reference in New Issue
Block a user