osCommerce and SSL directory setup on PLESK servers

Its taken me a while to figure this out. But the way to get this set up is:

1) symlink your httpsdocs folder to your httpdocs
2) chown the symlink to you user and folder group
3) touch a vhost_ssl.conf file
4) I used vi, but any editor will do, copy the contents of your vhost.conf data into the vhost_ssl.conf file

including the following:

RewriteEngine on
RewriteMap lowercase int:tolower
RewriteCond %{SERVER_PORT} ^80$
RewriteCond %{HTTP_HOST} ^www.DOMAIN_NAME$ [NC]
RewriteRule ^(.*)$ https://www.DOMAIN_NAME [L,P]

…your contents from vhost.conf…

5) Change any reference of httpdocs in the line to httpsdocs

(this will ensure all openbase_dir and includes are handled correctly. The rewrite above will make sure that any https connection will rewrite non-https requestes to https requests.

6) Make the standard changes to your config files to enable and include https capability.

7) run

/usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=DOMAIN_NAME

8) restart apache

9) you should be up and running.

Leave a Reply