I have Nginx on port 80 which handles abc.com, one.abc.com and two.abc.com. For abc.com and one.abc.com, it redirects to Apache in port 8080. For two.abc.com, it redirects to Apache in port 8081.
The task now is to upgrade to https. Where to install the certificate - on nginx or on apache? How does https calls hold good for the subdomains one.abc.comm and two.abc.com?
Sample nginx conf: server { listen 80; server_name abc.com, one.abc.com; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:8080; } }
server {
listen 80;
server_name two.abc.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8081;
}
}
Thanks in advance.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
Hello,
You need to install the SSL certificate on Nginx and you could use a wildcard SSL certificate to cover all of your subdomains.
Hope that this helps.