Nginx ssl redirect

Posted On // Leave a Comment

hello guys newbie need some help here :D


i got 2 domain both with valid ssl cert, i want to redirect AAA domain to BBB domain with AAA cert to keep transfer green


the BBB config all good, but AAA have problem


sudo ln -s /etc/nginx/sites-available/AAA.net /etc/nginx/sites-enabled/AAA.net sudo ln -s /etc/nginx/sites-available/http://ift.tt/1v5y4sb


AAA config



server {
listen 80;
listen 443 ssl;
ssl_certificate /etc/nginx/SSL/server.crt;
ssl_certificate_key /etc/nginx/SSL/server.key;
server_name www.AAA.net AAA.net;
root /var/www/AAAA.net;
rewrite ^(.*) https://www.BBB.net$1 permanent;
return 301 http://ift.tt/1nLz4mQ;
}

all AAA non ssl OK redirect to www.BBB.net (SSL)



AAA/* to BBB/* ssl

but the AAA SSL not redirect to BBB (SSL) ? nginx 1.7.5


http://ift.tt/1dvHQ0Z

0 comments:

Post a Comment