diff --git a/v0.5.0-应用图解.md b/v0.5.0-应用图解.md index c5cb08c..06039ba 100644 --- a/v0.5.0-应用图解.md +++ b/v0.5.0-应用图解.md @@ -63,12 +63,106 @@ http://ip 账号密码: admin admin ``` docker run -itd -p 8080:8080 -e JUMPSERVER_SERVER=http://192.168.50.128:8080 jumpserver/guacamole:latest +``` +附nginx配置 + +``` +server { + listen 80; + + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + location /luna/ { + try_files $uri / /index.html; + alias /opt/luna/; + } + + location /media/ { + add_header Content-Encoding gzip; + root /opt/jumpserver/data/; + } + + location /static/ { + root /opt/jumpserver/data/; + } + + location /socket.io/ { + proxy_pass http://localhost:5000/socket.io/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + + location /guacamole/ { + proxy_pass http://192.168.50.132:8080/; + proxy_buffering off; + proxy_http_version 1.1; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $http_connection; + access_log off; + } + + location / { + proxy_pass http://localhost:8080; + } +} + ``` **1.3.2 guacamole与jumpserver部署在同一主机上** ``` docker run -itd -p 9090:8080 -e JUMPSERVER_SERVER=http://192.168.50.128:8080 jumpserver/guacamole:latest +``` +附nginx配置 + +``` +server { + listen 80; + + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + location /luna/ { + try_files $uri / /index.html; + alias /opt/luna/; + } + + location /media/ { + add_header Content-Encoding gzip; + root /opt/jumpserver/data/; + } + + location /static/ { + root /opt/jumpserver/data/; + } + + location /socket.io/ { + proxy_pass http://localhost:5000/socket.io/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + + location /guacamole/ { + proxy_pass http://localhost:9090/; + proxy_buffering off; + proxy_http_version 1.1; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $http_connection; + access_log off; + } + + location / { + proxy_pass http://localhost:8080; + } +} + ``` **1.3.3 访问jumpserver管理后台接受guacamole的注册**