From 509cc4b65c6849bd5aeec24b067fd0b8e18c5a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=87=E6=83=B3=E6=8E=A7?= <704564722@qq.com> Date: Mon, 8 Jan 2018 13:07:24 +0800 Subject: [PATCH] =?UTF-8?q?Created=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 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 v0.5.0-Nginx-配置文件.md diff --git a/v0.5.0-Nginx-配置文件.md b/v0.5.0-Nginx-配置文件.md new file mode 100644 index 0000000..ddbe7b9 --- /dev/null +++ b/v0.5.0-Nginx-配置文件.md @@ -0,0 +1,31 @@ +##### 配置适用于版本:v0.5.0 + +* 示例如下 + +
+
+server {
+ listen 80;
+
+ location /luna/ {
+ try_files $uri / /index.html;
+ alias /opt/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;
+ }
+
+}