Commit 3f864f46 by xmh

nginx 配置文件

1 parent bbef25e5
upstream gateway { upstream gateway {
server 127.0.0.1:30000; server 127.0.0.1:30000;
server 192.168.9.233:30000;
server 192.168.9.133:30000;
} }
server { server {
listen 30010; listen 30010;
server_name localhost; server_name localhost;
client_max_body_size 500; client_max_body_size 10G;
location / { location / {
alias /xmh/fanxing3/page/; alias /xmh/fanxing3/page/;
...@@ -16,7 +14,7 @@ server { ...@@ -16,7 +14,7 @@ server {
location /srs/ { location /srs/ {
rewrite ^/srs/(.*) /$1 break; rewrite ^/srs/(.*) /$1 break;
proxy_pass http://192.168.9.233:8080; proxy_pass http://127.0.0.1:8080;
} }
location /api/ { location /api/ {
...@@ -35,19 +33,19 @@ server { ...@@ -35,19 +33,19 @@ server {
rewrite ^/api/video-server/(.*) /$1 break; rewrite ^/api/video-server/(.*) /$1 break;
add_header Access-Control-Allow-Methods '*'; add_header Access-Control-Allow-Methods '*';
add_header Access-Control-Allow-Headers 'Origin, X-Requested-With, Content-Type, Accept, Authorization'; add_header Access-Control-Allow-Headers 'Origin, X-Requested-With, Content-Type, Accept, Authorization';
proxy_pass http://192.168.9.233:10350/; proxy_pass http://127.0.0.1:10350/;
} }
location /api/video-cloud/ { location /api/video-cloud/ {
rewrite ^/api/video-cloud/(.*) /$1 break; rewrite ^/api/video-cloud/(.*) /$1 break;
proxy_pass http://192.168.9.233:8888/; proxy_pass http://127.0.0.1:8888/;
} }
} }
# grafana # grafana
server { server {
listen 33000; listen 33000;
location / { location / {
proxy_pass http://192.168.9.233:3000; proxy_pass http://127.0.0.1:3000;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
...@@ -68,14 +66,14 @@ server { ...@@ -68,14 +66,14 @@ server {
server { server {
listen 39090; listen 39090;
location / { location / {
proxy_pass http://192.168.9.233:9090; proxy_pass http://127.0.0.1:9090;
} }
} }
# consul # consul
server { server {
listen 38500; listen 38500;
location / { location / {
proxy_pass http://192.168.9.233:8500; proxy_pass http://127.0.0.1:8500;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!