Updated v0.5.0 Nginx 配置文件 (markdown)

master
假想控 2018-06-03 10:17:13 +08:00
parent ecd513e925
commit af82a8d951
2 changed files with 57 additions and 38 deletions

@ -1,38 +0,0 @@
##### 配置适用于版本v0.5.0
* 示例如下
<pre><code>
server {
listen 80;
location /luna/ {
try_files $uri / /index.html;
alias /path/of/your/luna/;
}
location /socket.io/ {
proxy_pass http://localhost:5000/socket.io/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# WebSocket support (nginx 1.4)
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location / {
proxy_pass http://localhost:8080;
}
}
</code></pre>
* 请替换如下表格的关键字
关键字 | 示例 | 说明
------------- | ------------- |-------
/path/of/your/luna/ | /opt/luna/ | luna所在的路径

@ -0,0 +1,57 @@
##### 配置适用于版本v0.5.0
* 示例如下
<pre><code>
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_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /guacamole/ {
proxy_pass http://localhost:8081/;
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;
}
}
</code></pre>
* 请替换如下表格的关键字
关键字 | 示例 | 说明
------------- | ------------- |-------
/path/of/your/luna/ | /opt/luna/ | luna所在的路径
http://localhost:8081/ | http://192.168.1.3:8081/ | 如果guacamole安装在别的服务器请填写它的ip