Nginx настроен в качестве фронтенда для IIS и Windows Admin Center. Однако, когда данный сервер не работает nginx выдаёт ошибку, что хост не найдет в Upstream.
Конфиг nginx:location /WaC/ {
proxy_pass https://win-adserver.domain.com:6516;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /adfs/ {
proxy_pass https://win-adserver.domain.com/adfs/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_ssl_name $host;
proxy_ssl_server_name on;
#fastcgi_buffers 1024 4k;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
}
location /CertEnroll/ {
proxy_pass https://win-adserver.domain.com/CertEnroll/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_ssl_name $host;
proxy_ssl_server_name on;
}
location /CertSrv/ {
proxy_pass https://win-adserver.domain.com/CertSrv/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_ssl_name $host;
proxy_ssl_server_name on;
}
Ошибкаиюн 02 11:04:17 nix-adserver.domain.com nginx[4282]: nginx: [emerg] host not found in upstream "win-adserver.domain.com" in /etc/nginx/sites-enabled/domain.com.conf>
июн 02 11:04:17 nix-adserver.domain.com nginx[4282]: nginx: configuration file /etc/nginx/nginx.conf test failed
Зачем Nginx пытается найти хост в upstream? Почему он просто не может подключаться по доменному имени? Как настроить
proxy_pass
в nginx?
Примечание:WaC - Windows Admin Center
CertEnroll - Служба регистрации в центре сертификации через Интернет