пусть тут полежит конфиг
дериктория /etc/nginx/nginx.conf
location / {
proxy_pass http://***.***.***.***:8080;
proxy_redirect http://***domain******.ru:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
Исправили на
location / {
proxy_pass http://***.***.***.***:8080;
proxy_redirect http://***domain******.ru:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
if ($host != 'www.***domain******.ru' ) {
rewrite ^/(.*)$ http://www.***domain******.ru/$1 permanent;
}
}