snow 发表于 2023-2-18 19:30:27

docker安装vaultwarden并配置nginx反向代理

本帖最后由 snow 于 2023-2-18 19:47 编辑

docker run -d --name vaultwarden -e ADMIN_TOKEN=88888888-v /vw-data/:/data/ -p 81:80 vaultwarden/server:latest

xiu 发表于 2023-2-18 19:30:59


6pro+plus+Ultra

fdg513 发表于 2023-2-18 19:33:51

6pro+plus+Ultra

魔法巴拉 发表于 2023-2-18 19:38:00

docker run -d --name vaultwarden -e ADMIN_TOKEN=888888 -v /vw-data/:/data/ -p 81:80 vaultwarden/server:latest
ADMIN_TOKEN是管理员密码
管理员页面是https://www.yuming.com:446/admin
在nginx配置文件nginx.conf中添加以下内容
server {
listen 80;
server_tokens off;
# access_log /var/log/nginx/web2.access.log main;
server_name www.yuming.com;
location ^~ / {
rewrite ^ https://$server_name:443$request_uri? permanent;
}
}
server{
listen 446 ssl http2;
server_name www.yuming.com;
gzip on;
gzip_proxied any;
gzip_min_length 1024;
gzip_comp_level 3;
gzip_types text/plain text/javascript text/css text/json application/javascript application/json image/jpeg image/gif image/png;
ssl on;
ssl_certificate /data/v2ray.crt;
ssl_certificate_key /data/v2ray.key;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:81;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
### Most PHP, Python, Rails, Java App can use this header -> https ###
proxy_set_header X-Forwarded-Proto $scheme;
}
}

魔法巴拉 发表于 2023-2-18 19:39:45

docker run -d --name vaultwarden -e ADMIN_TOKEN=888888 -v /vw-data/:/data/ -p 81:80 vaultwarden/server:latest

snow 发表于 2023-2-18 19:41:42

论坛有BUG,帖子发不全,等待站长修复中。

admin_ 发表于 2023-2-18 21:01:46

6pro+plus+Ultra

snow 发表于 2023-2-18 21:02:13

admin_ 发表于 2023-2-18 21:01
6pro+plus+Ultra

钱兔无量
页: [1]
查看完整版本: docker安装vaultwarden并配置nginx反向代理