123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- user root;
- worker_processes 4;
- events {
- worker_connections 1024;
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- sendfile on;
- keepalive_timeout 65;
- client_max_body_size 500M;
- server {
- listen 8000;
- server_name energyService;
- location / {
- root html/dist/;
- index index.html;
- try_files $uri $uri/ /index.html =404;
- client_max_body_size 500M;
- }
- location /api/{
- proxy_pass http://192.168.50.235:16300/;
- #客户端真实ip
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- }
- location /tiles {
- alias /usr/share/nginx/static/roadmap;
- autoindex on;
- expires 30d;
- access_log off;
- add_header Cache-Control "public";
- }
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
- location /transDataWeb/ {
- proxy_pass http://192.168.50.241:9002/;
- proxy_set_header Host $host:$server_port;
- 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; # 传递原始请求的主机头
- }
- }
- }
|