Page 1 of 1
Plesk - SSL on domain issued to localhost.localdomain
Posted: Sat Nov 27, 2010 12:59 pm
by chrismcb
Hi,
I have migrated servers with Plesk and am having an issue with one domain not using the SSL certificate it is configured to use.
I have the domain on an exclusive IP and have created the certificate in both the Administrator and Domain repositories, but setting the domain to use either of them still results in it using the default self-signed cert for localhost.localdomain.
I've even tried uploading a certificate for a completely different domain to see if it uses that, but it refuses to change from the localhost.localdomain one.
Can anyone offer any advice?
Thanks
Re: Plesk - SSL on domain issued to localhost.localdomain
Posted: Sat Nov 27, 2010 7:27 pm
by faris
Just in case 1: did you restart apache?
Just in case 2: did you stop and then start the psa service? (This isn't needed, but....)
Just in case 3: have you tried doing a websrvmngr -u -a (I can't see what good this would do, but ....)
Re: Plesk - SSL on domain issued to localhost.localdomain
Posted: Sun Nov 28, 2010 12:11 pm
by chrismcb
Thanks.
Yes, apache has been restarted, as has psa.
websrvmng hasn't done anything either.
Just seems very strange!
Any other things I could try?
Re: Plesk - SSL on domain issued to localhost.localdomain
Posted: Mon Nov 29, 2010 4:34 pm
by Highland
You can always dig into this manually (although it's not easy). Go into your /var/www/vhosts/*your domain name*/conf/httpd.include
Look for the certfile it's being told to use. Now, cat that file out.
Open your local file and compare it to the remote. They should be the same.
Re: Plesk - SSL on domain issued to localhost.localdomain
Posted: Mon Nov 29, 2010 5:06 pm
by chrismcb
Thanks - checked that and it is the same as my local file!
Still having the same issue - any other suggestions?
Re: Plesk - SSL on domain issued to localhost.localdomain
Posted: Tue Nov 30, 2010 10:12 am
by Highland
Hmm... well, we can go more extreme. Copy your httpd.include file into /etc/httpd/conf.d/y-test.conf and restart Apache (this is how we used to put certs on subdomains back in the day before Plesk supported it)
From here you can manually monkey with the config without worrying about wrecking Plesk, or vice versa. If you break Apache you just rename that file to something like y-test.txt and restart.
If that still doesn't load the correct cert take a look in /usr/local/psa/var/certificates and try loading some other cert files.
Re: Plesk - SSL on domain issued to localhost.localdomain
Posted: Tue Nov 30, 2010 4:30 pm
by chrismcb
OK, I've played about with it for a while now and gotten nowhere.
Here's what i tried:
- Took note of certificate the httpd.include file is referring to
- Deleed the certificate, restarting apache failed with error being unable to find the certificate - which it should
- Copied another working certificate into the above's locatin instead - restarted - still localhost.localdomain, when I know this certificate works on other domains
- Copied the certificate which should be working to another domain's - restarted - that domain shows the correct certificate
While writing this, i found the silliest solution
I changed the domain to be hosted on a shared IP, then back to exclusive with the SSL certificate and it now works!
Thanks everyone - I've now learned alot more about the workings of Plesk and its SSL features!
Hopefully this most trivial solution will be of use to someone at some point!