принудительно https
-
- Posts: 54
- Joined: Thu Dec 05, 2013 2:16 pm
принудительно https
как сделать принудительно https для всех сайтов?
Re: принудительно https
Можно сделать специальный шаблон для nginx. Шаблоны находятся в папке /usr/local/vesta/data/templates/web/nginx
Затем нужно заменить содержимое файла https.tpl на
Code: Select all
cd /usr/local/vesta/data/templates/web/nginx/
cp default.tpl https.tpl
cp default.stpl https.stpl
Code: Select all
server {
listen %ip%:%proxy_port%;
server_name %domain_idn% %alias_idn%;
location / {
rewrite ^(.*) https://%domain_idn%$1 permanent;
}
}
-
- Posts: 54
- Joined: Thu Dec 05, 2013 2:16 pm
Re: принудительно https
какую то часть заменить или все? там по дефолту намного больше текста :)skid wrote: Затем нужно заменить содержимое файла https.tpl наCode: Select all
server { listen %ip%:%proxy_port%; server_name %domain_idn% %alias_idn%; location / { rewrite ^(.*) https://%domain_idn%$1 permanent; } }
Re: принудительно https
Надо заменить все