Control Web Panel

WebPanel => SSL => Topic started by: kerfiseining on May 09, 2016, 08:58:13 PM

Title: How to secure the CWP panel https
Post by: kerfiseining on May 09, 2016, 08:58:13 PM
Can someone explain to me how to secure the CWP panel https://domainname.ext:2031 
with an bought SSL certificate.
Title: Re: How to secure the CWP panel https
Post by: kerfiseining on May 09, 2016, 10:26:11 PM
Never mind.

I found out how to do this.

This is what I did.


cd /etc/pki/tls/certs/


sr1.domain.ltd is your FQDN

nano sr1.domain.ltd.crt

copy all the lines and generate a new SSL from our SSL provider.

empty the file.


cat /dev/null > sr1.domain.ltd.crt

insert the new .crt from your ssl provider.

nano sr1.domain.ltd.crt

Next

nano /usr/local/cwpsrv/conf.d/cwp-ssl.conf

replace server IP with * like this

Listen 2031
<VirtualHost 192.168.1.2:2031>
        ServerName 192.168.1.2
        SSLEngine on
   SSLCertificateKeyFile /etc/pki/tls/private/sr1.domain.ltd.key
   SSLCertificateFile /etc/pki/tls/certs/sr1.domain.ltd.crt
        SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
</VirtualHost>


To

Listen 2031
<VirtualHost *:2031>
        ServerName *
        SSLEngine on
   SSLCertificateKeyFile /etc/pki/tls/private/sr1.domain.ltd.key
   SSLCertificateFile /etc/pki/tls/certs/sr1.domain.ltd.crt
        SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
</VirtualHost>


Then restart cwp service like this /etc/init.d/cwpsrv restart

All is working fine now.