#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; proxy_buffer_size 128k; proxy_buffers 32 128k; proxy_busy_buffers_size 128k; keepalive_timeout 65; server { listen 81; server_name localhost;#修改为host location /Bug { proxy_pass http://127.0.0.1:8091; } location ^~ /dashboard/ { proxy_pass http://localhost:6666; } location ^~ /static/ { proxy_pass http://localhost:6666; } location /QC { proxy_pass http://127.0.0.1:8080; } location ^~ /document/ { alias /back_end/document/; # 文件存放目录,注意要以 '/' 结尾; index index.html; # 如果文件存放目录有 index.html,会跳转到 index.html; autoindex on; # 自动列出目录下的文件; autoindex_exact_size off; # 文件大小按 G、M 的格式显示,而不是 Bytes; } location ^~ /resourceXinchuang/ { alias /Users/hannatao/Downloads/; # 文件存放目录,注意要以 '/' 结尾; index index.html; # 如果文件存放目录有 index.html,会跳转到 index.html; autoindex on; # 自动列出目录下的文件; autoindex_exact_size off; # 文件大小按 G、M 的格式显示,而不是 Bytes; } location / { proxy_pass http://localhost:5555; #return 404; } } server { listen 5555; server_name localhost; location / { root /front_end/prod/; index index.html; try_files $uri $uri/ /index.html; } } server { listen 6666; server_name localhost; location / { root /databoard/dist/; index index.html; try_files $uri $uri/ /index.html; } } }