Adding HTTPS in WP general (second site) - redirecting on another domain?

Posted February 12, 2016 1.3k views


i run apache on Ubuntu. Installed 2 wordpress websites and installed ssl cert on both. All was working fine. I have site1 and site2, site1 i changed in wp general URL to HTTPS. And its working with https.

But have problem with site2, when I add HTTPS for that domain, i got redirect to site1.

And only able to change URL from database from site2.

Also now when i put in address bar its showing me content from site1 but domain is

I hope you guys understand me what i want to ask.

Site2 config in /etc/apache2/sites-available/site2

<VirtualHost *:443>


    DocumentRoot /var/www/
    SSLEngine on
    SSLProtocol all -SSLv2

    SSLCertificateFile /var/www/site2ssl/
    SSLCertificateKeyFile /var/www/site2ssl/site2.key
    SSLCertificateChainFile /var/www/site2ssl/site2.crt


Same is for site1 just other paths and site1.


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.

Submit an Answer
1 answer

I find solution for this. And it works now.

nano /etc/apache2/ports.conf 

Just added to ports.conf below NameVirtualHost *:80

NameVirtualHost *:443