VestaCP - как сделать 301 редирект с IP на домен

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2023
Перейти к:навигация, поиск
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

VestaCP - как сделать 301 редирект с IP на домен

Все делается через конфиг

/etc/nginx/conf.d/ip.conf
# vi /etc/nginx/conf.d/ip.conf
server {
   listen       ip:80 default;
   server_name  _;
   #access_log  /var/log/nginx/ip.log main;
   location / {
#        proxy_pass  http://ip:8080;
        return 301 https://site.ru;
  }
}