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