diff --git a/build/etc/conf.d/nginx/omc.conf b/build/etc/conf.d/nginx/omc.conf index 839baa3..cb4221b 100644 --- a/build/etc/conf.d/nginx/omc.conf +++ b/build/etc/conf.d/nginx/omc.conf @@ -40,8 +40,26 @@ server { root /usr/local/omc/htdocs/front/; index index.html index.htm; server_name localhost; + location /omc-api/ { + proxy_pass http://127.0.0.1:3030/; + + proxy_http_version 1.1; + proxy_cache_bypass $http_upgrade; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Port $server_port; + } + location / { - try_files $uri $uri/ =404; + root /usr/local/omc/htdocs/front; + + try_files $uri $uri/ /index.html; + index index.html index.htm; } } diff --git a/docs/tips.txt b/docs/tips.txt index f0b8232..49dc4df 100644 --- a/docs/tips.txt +++ b/docs/tips.txt @@ -47,4 +47,4 @@ java -Dfile.encoding=utf-8 -jar ost-20230807.jar mysqldump -h 192.168.2.211 -P 33066 -u root -p1000omc@kp! omc_db > omc_db.sql #导出数据库user表结构和数据 -mysqldump -h 192.168.2.211 -P 33066 -u root -p1000omc@kp! omc_db user > omc_db.sql \ No newline at end of file +mysqldump -h 192.168.2.211 -P 33066 -u root -p1000omc@kp! omc_db user > omc_db.sql