feat: vaultwarden! Communication via host!

This commit is contained in:
Hane 2026-05-21 21:16:03 +02:00
commit bf79d2bfab
8 changed files with 99 additions and 18 deletions

2
config/nginx/certs/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*.pem
*.key

View file

@ -1,4 +1,3 @@
#user nobody;
worker_processes 1;
@ -8,7 +7,6 @@ worker_processes 1;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
@ -32,13 +30,29 @@ http {
#gzip on;
upstream vaultwarden-default {
zone vaultwarden-default 64k;
server 192.168.1.45:8000;
keepalive 2;
}
# Needed to support websocket connections
# See: https://nginx.org/en/docs/http/websocket.html
# Instead of "close" as stated in the above link we send an empty value.
# Else all keepalive connections will not work.
map $http_upgrade $connection_upgrade {
default upgrade;
'' "";
}
server {
listen 80;
server_name localhost;
#access_log logs/host.access.log main;
location / {
location / {
rewrite ^/test(.*)$ / break;
root /var/www;
index index.html index.htm;
}
@ -93,23 +107,31 @@ http {
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
server {
listen 443 ssl;
server_name localhost 192.168.1.45 internal.test;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
ssl_certificate /etc/nginx/certs/CERTS.pem;
ssl_certificate_key /etc/nginx/certs/KEY.pem;
#cert.key
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
rewrite ^/test(.*)$ / break;
# location / {
# root html;
# index index.html index.htm;
# }
#}
#location /test {
# rewrite ^/test(.*)$ / break;
# root /var/www;
# index index.html index.htm;
#}
location / {
proxy_pass http://vaultwarden-default;
}
}
}

View file

@ -0,0 +1 @@