Commit ed92d808d065b607a09617ff069a92c005073c65

Authored by xp.Huang
1 parent aaf672c4

feat: 添加组态的代理配置

Showing 1 changed file with 59 additions and 49 deletions
1   -server {
2   - listen 80;
3   - listen [::]:80;
4   - server_name 192.168.1.48;
5   - #charset koi8-r;
6   - #access_log /var/log/nginx/host.access.log main;
7   -
8   - root /usr/share/nginx/html;
9   - index index.html index.htm;
10   - try_files $uri $uri/ /index.html;
11   -
12   -
13   -
14   - location /api/ {
15   - proxy_pass http://192.168.1.48:8080;
16   - proxy_http_version 1.1;
17   - proxy_set_header Upgrade $http_upgrade;
18   - proxy_set_header Connection "Upgrade";
19   - proxy_set_header Host $host;
20   - proxy_cache_bypass $http_upgrade;
21   - }
22   -
23   - location /yt/ {
24   - proxy_pass http://192.168.1.48:8080;
25   - proxy_http_version 1.1;
26   - proxy_set_header Upgrade $http_upgrade;
27   - proxy_set_header Connection "Upgrade";
28   - proxy_set_header Host $host;
29   - proxy_cache_bypass $http_upgrade;
30   - }
31   -
32   - location /upload/ {
33   - proxy_pass http://192.168.1.48:8080;
34   - proxy_http_version 1.1;
35   - proxy_set_header Upgrade $http_upgrade;
36   - proxy_set_header Connection "Upgrade";
37   - proxy_set_header Host $host;
38   - proxy_cache_bypass $http_upgrade;
39   - }
40   -
41   - #error_page 404 /404.html;
42   -
43   - # redirect server error pages to the static page /50x.html
44   - #
45   - error_page 500 502 503 504 /50x.html;
46   - location = /50x.html {
47   - root /usr/share/nginx/html;
48   - }
49   -}
\ No newline at end of file
  1 +server {
  2 + listen 80;
  3 + listen [::]:80;
  4 + server_name 192.168.1.48;
  5 + #charset koi8-r;
  6 + #access_log /var/log/nginx/host.access.log main;
  7 +
  8 + root /usr/share/nginx/html;
  9 + index index.html index.htm;
  10 + try_files $uri $uri/ /index.html;
  11 +
  12 +
  13 +
  14 + location /api/ {
  15 + proxy_pass http://192.168.1.48:8080;
  16 + proxy_http_version 1.1;
  17 + proxy_set_header Upgrade $http_upgrade;
  18 + proxy_set_header Connection "Upgrade";
  19 + proxy_set_header Host $host;
  20 + proxy_cache_bypass $http_upgrade;
  21 + }
  22 +
  23 + location /yt/ {
  24 + proxy_pass http://192.168.1.48:8080;
  25 + proxy_http_version 1.1;
  26 + proxy_set_header Upgrade $http_upgrade;
  27 + proxy_set_header Connection "Upgrade";
  28 + proxy_set_header Host $host;
  29 + proxy_cache_bypass $http_upgrade;
  30 + }
  31 +
  32 + location /upload/ {
  33 + proxy_pass http://192.168.1.48:8080;
  34 + proxy_http_version 1.1;
  35 + proxy_set_header Upgrade $http_upgrade;
  36 + proxy_set_header Connection "Upgrade";
  37 + proxy_set_header Host $host;
  38 + proxy_cache_bypass $http_upgrade;
  39 + }
  40 +
  41 + location /thingskit-scada {
  42 + proxy_pass http://192.168.1.48:8083/;
  43 + proxy_http_version 1.1;
  44 + proxy_set_header Upgrade $http_upgrade;
  45 + proxy_set_header Connection "Upgrade";
  46 + proxy_set_header Host $host:8083;
  47 + proxy_set_header X-Forwarded-Port 8083;
  48 + proxy_cache_bypass $http_upgrade;
  49 + }
  50 +
  51 + #error_page 404 /404.html;
  52 +
  53 + # redirect server error pages to the static page /50x.html
  54 + #
  55 + error_page 500 502 503 504 /50x.html;
  56 + location = /50x.html {
  57 + root /usr/share/nginx/html;
  58 + }
  59 +}
... ...