From af82a8d951cdeb0481405e2d4483a996d96915ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=87=E6=83=B3=E6=8E=A7?= <704564722@qq.com> Date: Sun, 3 Jun 2018 10:17:13 +0800 Subject: [PATCH] =?UTF-8?q?Updated=20v0.5.0=20Nginx=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=20(markdown)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v0.5.0-Nginx-配置文件.md | 38 --------------------------- v1.3.x-Nginx-配置文件.md | 57 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 38 deletions(-) delete mode 100644 v0.5.0-Nginx-配置文件.md create mode 100644 v1.3.x-Nginx-配置文件.md diff --git a/v0.5.0-Nginx-配置文件.md b/v0.5.0-Nginx-配置文件.md deleted file mode 100644 index 30d6cc2..0000000 --- a/v0.5.0-Nginx-配置文件.md +++ /dev/null @@ -1,38 +0,0 @@ -##### 配置适用于版本:v0.5.0 - -* 示例如下 - -
-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;
- }
-
-}
-
-
-* 请替换如下表格的关键字
-
-
-关键字 | 示例 | 说明
-------------- | ------------- |-------
- /path/of/your/luna/ | /opt/luna/ | luna所在的路径
\ No newline at end of file
diff --git a/v1.3.x-Nginx-配置文件.md b/v1.3.x-Nginx-配置文件.md
new file mode 100644
index 0000000..045480f
--- /dev/null
+++ b/v1.3.x-Nginx-配置文件.md
@@ -0,0 +1,57 @@
+##### 配置适用于版本:v0.5.0
+
+* 示例如下
+
+
+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;
+ }
+}
+
+
+* 请替换如下表格的关键字
+
+
+关键字 | 示例 | 说明
+------------- | ------------- |-------
+ /path/of/your/luna/ | /opt/luna/ | luna所在的路径
+http://localhost:8081/ | http://192.168.1.3:8081/ | 如果guacamole安装在别的服务器,请填写它的ip
\ No newline at end of file