Current time: 12-23-2024, 02:33 AM Hello There, Guest! (LoginRegister)


Post Reply 
SSL support - script and instructions
Author Message
Feyr Offline


Posts: 4
Joined: Aug 2008
Reputation: 0
Post: #1
SSL support - script and instructions
i needed to host SSL sites on my ispcp installation, so i wrote a script to do it. i don't expect it to be in mainline because 1. it's in perl 2. it's quickly put together 3. it may have major bugs that could cause worldwar III. use at your own risk

installation instructions:
first install the attached script somewhere (i used /var/www/ispcp-bin)
then add a new file in /etc/cron.d with the following line (adjust the first path to the script)
*/6 * * * * root /var/www/ispcp-bin/upd-ssl.pl > /etc/apache2/sites-enabled/ispcp-ssl.conf

once that is done. the script is ready to go. do the following to create a new SSL site:

applied to a potential domain named http://www.test.com. where the common name of the certificate is "www.test.com"


in ISPCP:
as root,
1. go to settings (top menu) then manage IPs (left menu)
2. add your IP with the sitename and the alias as http://www.test.com
3. go to manage user, click "edit" next to the reseller
-fill in the two password fields (bug, you have to change the password every time. but you can reuse it if you remember it)
- click the checkbox next to the new IP you added
- click update
4. switch to the reseller
5. add a user as usual, but select the new IP as the domain IP


IN a root shell:
1. put the certificate AND the unencrypted key in a file named "www.test.com.pem", back it up safely
2. copy that file to /etc/apache2/ssl
3. edit /etc/ispcp/apache/ssl.list, add a line in the following format: "www.test.com http://www.test.com.pem" where the first argument is the site name and the second the certificate file we created in step 1
4. edit /etc/network/interfaces, add an ip like you normally would for an ip alias, don't forget to add the interface to the "auto" line
5. type ifup -a


last: wait 6 minutes

CAVEAT:
ispcp doesn't permit modifying a site's IP address, to add SSL to an existing site you have to delete it first


----


that's all, any comments, modifications, or unforseen bugs are welcome. i coded this in roughly an hour late at night, i wouldn't be surprised if it was full of them. but it seem to work

NOTE: rename the script to remove the .txt, forum didn't like my .pl extension..
NOTE: be careful of the http:// in my instructions, it's the forum software adding it. stick to what's logical


Attached File(s)
.txt  upd-ssl.pl.txt (Size: 1.36 KB / Downloads: 93)
(This post was last modified: 08-21-2008 10:10 PM by Feyr.)
08-21-2008 02:19 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
SSL support - script and instructions - Feyr - 08-21-2008 02:19 PM

Forum Jump:


User(s) browsing this thread: 4 Guest(s)