Control Web Panel

WebPanel => SSL => Topic started by: Vitech_Team on April 12, 2017, 01:45:34 AM

Title: Host SSL Centos 7
Post by: Vitech_Team on April 12, 2017, 01:45:34 AM
How to SSL the host?, I tried several ways and I can't get it done. The wiki page is outdated since /usr/local/cwpsrv/conf.d/cwp-ssl.conf doesn't exist. Also the latest version states not to use letsencrypt and use SSL Cert Manager instead.

Any Ideas or guides on how to get this done?

Thanks.
Title: Re: Host SSL Centos 7
Post by: tshetumd on April 12, 2017, 06:30:30 AM
How to SSL the host?, I tried several ways and I can't get it done. The wiki page is outdated since /usr/local/cwpsrv/conf.d/cwp-ssl.conf doesn't exist. Also the latest version states not to use letsencrypt and use SSL Cert Manager instead.

Any Ideas or guides on how to get this done?

Thanks.

Please edit /usr/local/cwpsrv/conf/ cwpsrv.conf
and
Replace  " ssl_certificate     /etc/pki/tls/certs/hostname.crt;
             ssl_certificate_key /etc/pki/tls/private/hostname.key; "

with your certificate .


Thanks
Title: Re: Host SSL Centos 7
Post by: Vitech_Team on April 12, 2017, 09:39:31 AM
Thank you for your answer.

What certificate you replaced with? How do I create a valid SSL certificate? Using Letsencrypt or auto ssl now?

Thanks.
Title: Re: Host SSL Centos 7
Post by: tshetumd on April 12, 2017, 12:23:28 PM
Thank you for your answer.

What certificate you replaced with? How do I create a valid SSL certificate? Using Letsencrypt or auto ssl now?

Thanks.

using letsencrypt .. replace with
     ssl_certificate /etc/letsencrypt/live/yourhostname/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/yourhostname/privkey.pem

Thnaks
Title: Re: Host SSL Centos 7
Post by: Vitech_Team on April 12, 2017, 08:02:09 PM
Ok, so. This is what I did.

Fresh centos 7 minimal installation with the latest CWP (0.9.8.304)

First I added this.

# vhost_start host.hostname.com
<VirtualHost SERVER-IP:80>
ServerName host.hostname.com
ServerAlias www.host.hostname.com
ServerAdmin xyz@mail.com
DocumentRoot "/usr/local/apache/htdocs/"

<IfModule mod_suexec.c>
        SuexecUserGroup nobody nobody
</IfModule>

<IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
</IfModule>

<Directory "/usr/local/apache/htdocs">
        AllowOverride All
</Directory>

</VirtualHost>
# vhost_end host.hostname.com


Restarted apache

Second I installed Letsencrypt and did this:
Domain : host.hostname.com
Path : /usr/local/apache/htdocs/
UserName : nobody
Email : youremail@xyz.com
IP : your Server IP
Port : 443

and this is the error I got now.


Failed authorization procedure. host.hostname.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://host.hostname.com/.well-known/acme-challenge/4k1GJb96Spl1tAjzt-GxQjCxDsSEnWQfsq_pNlxJhxU: "
Title: Re: Host SSL Centos 7
Post by: Administrator on April 13, 2017, 04:37:23 AM
hostname certificate with autoSSL is generated when you change your hostname