M
mlovick
Guest
I find it truly amazing that Plesk does not have a direct way of adding shared SSL for plesk domains.
As a recent convert to plesk - i was very disapointed that this feature was not implemented, as our policy is to allow shared SSL for my domain customers to test their sites with.
So i set about looking into the easiest method, which for me involved using apache userDir.
Anyway - here is how I solved the problem.
1. I created a domain with my certificate as I normally would. Tested and working with the SSL certificate on a dedicated IP address.
2. I then created a file named "redirect.php" with the following contents:
Where [SECURE_DOMAIN] is the certificate domain.
3. In the conf folder of the secure domain I created a file named "vhost_ssl.conf" with the following content:
Then run the following command:
/usr/local/psa/admin/sbin/websrvmng --vhost-name=[SECURE_DOMAIN]
Where [SECURE_DOMAIN] is the certificate domain.
4. after restarting the webserver I logged into Plesk as admin
5. I created a custom button labled "Shared SSL" and with the URL to: https://[SECURE_DOMAIN]/redirect.php
And the checkbox checked: "&ftp_user=<ftp_user>"
Done
- it works perfectly.
As a recent convert to plesk - i was very disapointed that this feature was not implemented, as our policy is to allow shared SSL for my domain customers to test their sites with.
So i set about looking into the easiest method, which for me involved using apache userDir.
Anyway - here is how I solved the problem.
1. I created a domain with my certificate as I normally would. Tested and working with the SSL certificate on a dedicated IP address.
2. I then created a file named "redirect.php" with the following contents:
PHP:
<?
$user = $_GET["ftp_user"];
header("Location: https\:\/\/[SECURE_DOMAIN]/~$user/");
?>
Where [SECURE_DOMAIN] is the certificate domain.
3. In the conf folder of the secure domain I created a file named "vhost_ssl.conf" with the following content:
PHP:
<IfModule mod_userdir.c>
UserDir httpdocs
UserDir enable *
</IfModule>
Then run the following command:
/usr/local/psa/admin/sbin/websrvmng --vhost-name=[SECURE_DOMAIN]
Where [SECURE_DOMAIN] is the certificate domain.
4. after restarting the webserver I logged into Plesk as admin
5. I created a custom button labled "Shared SSL" and with the URL to: https://[SECURE_DOMAIN]/redirect.php
And the checkbox checked: "&ftp_user=<ftp_user>"
Done