遇到的问题:
- 使用jumpserver/jms_all:v4.0.0镜像部署后配置了反向代理到域名
- 访问域名可以正常显示网页,登录时提示需要配置
DOMAINS
- 按照既往帖子的指引(在容器内)未能找到
/opt/jumpserver/config
目录
- (在容器内)自行创建目录和config.txt文件并配置
777
权限后问题依旧
- 另,使用IP地址可以正常访问并登录
可能有助于解决问题的配置文件
- docker-compose.yml(部分密码、token等已隐去)
version: '3'
services:
jumpserver:
image: jumpserver/jms_all:v4.0.0
container_name: jumpserver-1
ports:
- "2280:80"
- "2222:2222"
- "30000-30100:30000-30100"
environment:
SECRET_KEY: "HIDDEN"
BOOTSTRAP_TOKEN: "HIDDEN"
LOG_LEVEL: "DEBUG"
DB_HOST: "HIDDEN"
DB_PORT: "3306"
DB_USER: "jumpserver"
DB_PASSWORD: "HIDDEN"
DB_NAME: "jumpserver"
REDIS_HOST: "HIDDEN"
REDIS_PORT: "6379"
REDIS_PASSWORD: "HIDDEN"
volumes:
- ./core/data:/opt/jumpserver/data
- ./config:/opt/jumpserver/config
- ./koko/data:/opt/koko/data
- ./lion/data:/opt/lion/data
- ./kael/data:/opt/kael/data
- ./chen/data:/opt/chen/data
- ./web/log:/var/log/nginx
privileged: true
DOMAINS="<域名1>HIDDEN:443,<域名2>HIDDEN:443,<内网IP1>HIDDEN:2280,<内网IP2>HIDDEN:2280"
ewall
3
docker-compose.yml
这个文件下的environment自己加一个DOMAINS的环境变量