- 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;
- }
- }
复制代码 |