在我目前的设置中:
请在下面找到nginx配置:
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
index index.html;
root html;
location / {
try_files $uri$args $uri$args/ /index.html;
}
location /Tomcat {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8080/Tomcat;
proxy_read_timeout 180;
}
}
除了设计用于上传功能的端点外,一切正常。实际上当我尝试将一些文件上传到nginx后,从tomcat服务器返回状态码400
,并显示以下错误消息:
Unable to process parts as no multi-part configuration has been provided
在没有nginx的情况下,相同的情况正常。
有人可以建议如何修复它吗?