A
A
Artyom2019-05-28 19:41:23
Nginx
Artyom, 2019-05-28 19:41:23

Why is nginx 301 redirect not working?

If you just write ixley.ru, then it redirects, but if you write test.ixley.ru or www.ixley.ru, the redirect does not work
Please tell me

server {

root /var/www/ixley.ru;
index index.php index.html index.htm;

listen 80;
listen 443 ssl;
server_name ixley.ru www.ixley.ru *.ixley.ru;
return 301 https://samox1n.ru$request_uri;

ssl_certificate /etc/letsencrypt/live/ixley.ru-0001/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ixley.ru-0001/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artyom, 2019-05-29
@ixley

Registered DNS and it all worked :-) Thanks Alexey Ten

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question