新增以下配置便可:html
location /cas { proxy_pass http://172.16.20.155:8080/cas; proxy_redirect default; proxy_read_timeout 600s; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; index index.html index.htm; }