我的nginx设置如下:
server {
listen 80;
server_name 172.16.0.150 ;
charset utf-8;
access_log /var/log/nginx/project.access.log;
error_log /var/log/nginx/project.error.log info;
client_max_body_size 1600M;
location / {
root /var/www/project_200;
try_files $uri @wsgiapp;
}
location @wsgiapp {
uwsgi_read_timeout 10800;
uwsgi_pass unix:///tmp/project.sock;
include /etc/nginx/uwsgi_params;
}
location /geoserver/ {
proxy_set_header Host $host;
proxy_read_timeout 600s;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://172.16.0.160:8080/geoserver/;
}
}
当我向浏览器命中以下请求时,它显示以下 403 Forbidden 错误:
我发现,URL中的 AND 是nginx的问题。但没有任何解决办法。