#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;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 8999;
server_name 192.168.70.215;
#charset koi8-r;
#access_log logs/host.access.log main;
location /{
root /usr/local/nginx/dist/dist;
try_files $uri $uri/ /index.html;
# 禁用缓存
add_header Cache-Control no-store;
}
location /wsapi/
{
# 若访问的是 http:// http://127.0.0.1:8999/wsapi/system/getuser
# 则 nginx会转发 http://127.0.0.1:8300/system/getuser
proxy_pass http://127.0.0.1:8300/;
proxy_redirect off;
proxy_read_timeout 180s;
proxy_cookie_path /* /;
proxy_set_header Cookie $http_cookie;
# 禁用缓存
add_header Cache-Control no-store;
}
}
}