Welcome! Log In Create A New Profile

Advanced

server location from http to https on same server

August 17, 2020 03:07AM
Всем привет!

Есть конфиг:

server {
listen 80;
server_name domen.com;

location /ua/articles/article1/ { return 301 https://domen.com/blog-item/article1/; }
location /ua/articles/article2/ { return 301 https://domen.com/blog-item/article3/; }
...

location / { return 301 https://domen.com; }
}

server {
listen 80;
server_name www.domen.com;
return 301 https://domen.com;
}

server {
listen 443 ssl;
server_name www.domen.com;
ssl_certificate ...;
ssl_certificate_...;
return 301 https://domen.com;
}

server {
listen 443 ssl;
server_name domen.com;
root /.../public;
ssl_certificate ...;
ssl_certificate_key ...;
...
}

Проблема в:
location /ua/articles/article1/ { return 301 https://domen.com/blog-item/article1/; }
путь в location не определяеться, редирект не происходит, а пытаеться зайти на https://domen.com/ua/articles/article1...
перепробовал уже регулярки в location =, ~*, ... не работает.
куда смотреть?
Subject Author Posted

server location from http to https on same server

akoval August 17, 2020 03:07AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 49
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready