I just added a self signed SSL certificate on one of my virtual hosts. I'm using Ubuntu Server and Webmin, if that helps. The site I added the certificate for works perfectly, but trying to access a different virtual server takes you to the default server page(var/www). If I type in the url for the other virtual servers with https in front, I get redirected to the site that I added the certificate to. Does this have anything to do with ports? Any advice would be appreciated.
-
1Can you post the web server's actual configuration files?– Shane MaddenOct 14, 2011 at 23:21
-
Have you restarted Apache lately? It's possible there were other configuration changes made months ago, which only got picked up when you restarted the Apache server today.– Stefan LasiewskiOct 14, 2011 at 23:42
1 Answer
If I type in the url for the other virtual servers with https in front, I get redirected to the site that I added the certificate to. Does this have anything to do with ports?
Assuming your server only has one IP address for all the virtual hosts then this behaviour is normal. All traffic using https will be directed to port 443. There can only be one virtual host on port 443 per IP address so this becomes the default one.
As to why your other non https virtual hosts have stopped working we will need more info. As Shane has commented
-
I'm sorry about that. I was in a rush to get things fixed. I actually fixed the issue. The virtual server with the certificate was set to use any port. I changed it to 443. Thanks.– ArthurOct 14, 2011 at 23:53