Answer the question
In order to leave comments, you need to log in
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question