This document gives a step-by-step instruction on how to secure your CP apache server with a regular SSL certificate.
Note: You can secure your control panel with a wildcard certificate if you install it on the same domain name. For example, if your cp domain name is cp.example.com, you can secure it by installing wildcard certificate to example.com.
We recommend that you configure your system to be accessible both by http and https, because Parallels SiteStudio does not fully support https protocol.
To secure your CP with regular SSL:
#mkdir cert
Make this directory available only for root:
#chmod 700 cert
Go to this directory:
#cd cert
#openssl genrsa -des3 -out server.key 1024
When prompted for a pem phrase, enter any combination of 4 characters, e.g. 1234. A unique private key will be generated into the server.key file.
For more, read modssl documentation (http://www.modssl.org/source/mod_ssl-2.8.16-1.3.29.tar.gz).
#chmod 600 server.key
#openssl rsa -noout -text -in server.key
#openssl rsa -in server.key -out server.key.unsecure
#cp server.key.unsecure server.key
#openssl req -new -key server.key -out server.csr
You will have to answer many questions related to your company. Your answers are required to be included in the certificate.
Note: Common name is the URL at which you want your control panel to be available, e.g. cp.yourdomain.com (not yourdomain.com).
#openssl req -noout -text -in server.csr
If you find a mistake in the data you have submitted, you can re-generate the request anew.
# mkdir backup
# chmod 700 backup
# cp ./*.* backup/
# openssl x509 -noout -text -in server.crt
# cp -f ./server.key /hsphere/local/home/cpanel/apache/etc/ssl.key/
# cp -f ./server.crt /hsphere/local/home/cpanel/apache/etc/ssl.crt/
# cp -f ./ca-bundle.crt /hsphere/local/home/cpanel/apache/etc/ssl.crt/
/hsphere/local/home/cpanel/apache/etc/ssl.crt/ca.crt
SSLCertificateChainFile /hsphere/local/home/cpanel/apache/etc/ssl.crt/ca.crt
to file:
/hsphere/local/home/cpanel/apache/etc/httpd.conf.tmpl.custom
hsphere.properties:# vi /hsphere/local/home/cpanel/shiva/psoft_config/hsphere.properties
and change lines:
CP_PORT = 8080
CP_PROTOCOL=http://
to:
CP_PORT = 8443
CP_PROTOCOL=https://
# vi /hsphere/local/home/cpanel/apache/logs/ssl_engine_log
Now your control panel must be available at both http://cp.yourdomain.com:8080 and https://cp.yourdomain.com:8443