我们已将Nginx配置为代理服务器。 在代理服务器后面,有两个IIS 8.5服务器。
确认负载均衡器工作正常 https://Domainname/serverid.txt显示来自后端服务器的数据。 但是当我们尝试调用API https://Domainname/SOA时,我们会收到以下错误: - 404 - 找不到文件或目录。 您要查找的资源可能已被删除,名称已更改或暂时不可用。
Nginx配置文件: cat /etc/nginx/conf.d/load-balancer.conf
upstream loadbalancer {
#ip_hash;
server xx.xx.xx.xx;
server xx.xx.xx.xx;
}
server {
listen 80;
listen 443 ssl;
ssl_certificate /etc/nginx/ssl/domainname/ca.pem;
ssl_certificate_key /etc/nginx/ssl/domainname/private.key;
location /SOA/ {
proxy_set_header Host $host;
proxy_pass http://loadbalancer;
}
}
/var/log/nginx/access.log显示以下内容: -
14.xx.xx.xx - - [05/Jun/2018:09:21:38 -0400] "GET /SOA/services/UserInformation HTTP/1.1" 404 700 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36"
14.xx.xx.xx - - [05/Jun/2018:09:21:41 -0400] "GET /SOA/services/UserInformation HTTP/1.1" 404 700 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36"
14.xx.xx.xx - - [05/Jun/2018:09:21:43 -0400] "GET /SOA/services/UserInformation HTTP/1.1" 404 700 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36"
请协助