Control Web Panel

WebPanel => SSL => Topic started by: mekosaad on March 24, 2015, 09:08:32 AM

Title: Problem when I add ssl
Post by: mekosaad on March 24, 2015, 09:08:32 AM
First thing shows me

Code: [Select]
# vhost_start site.com
<Virtualsite 11.111.111.111:443>
 ServerName site.com
 ServerAlias www.site.com
 DocumentRoot /home/site/public_html
 SSLEngine on
 SSLCertificateFile /etc/pki/tls/certs/site.com.cert
 SSLCertificateKeyFile /etc/pki/tls/private/site.com.key
 SSLCertificateChainFile /etc/pki/tls/certs/site.com.bundle
<IfModule mod_suexec.c>
    SuexecUserGroup site site
</IfModule>

<IfModule mod_suphp.c>
    suPHP_UserGroup host site
    suPHP_ConfigPath /home/site
</IfModule>

<Directory "/home/site/public_html">
    AllowOverride All
</Directory>
</VirtualHost>
# vhost_end site.com

SUCCESS! SSL Certificate for domain site.com installed in: /usr/local/apache/conf.d/vhosts-ssl.conf !
SUCCESS! SSL Certificate added to CWP configuration file

And stops Apache

Stopping httpd: [  OK  ]
Starting httpd: Syntax error on line 34 of /usr/local/apache/conf.d/vhosts-ssl.conf:
SSLCertificateFile: file '/etc/pki/tls/certs/site.com.cert' does not exist or is empty
[FAILED

https works without a problem you do through checking this site
https://www.sslshopper.com/ssl-checker.html
Title: Re: Problem when I add ssl
Post by: sokki on March 24, 2015, 10:40:20 AM
that file is empty

you need to edit that file and add your certificate key in
Title: Re: Problem when I add ssl
Post by: mekosaad on March 24, 2015, 11:30:29 AM
Already this file does not exist, but where you bring him  :-[

When I enter the
Location of Certificate files /etc/pki/tls/certs/

This problem appears

Code: [Select]
Deprecated: Function ereg() is deprecated in /usr/local/cwpsrv/htdocs/resources/admin/modules/file_manager.php(1) : eval()'d code(1) : eval()'d code on line 212
/etc/pki/tls/certs/111111.com.crt
Title: Re: Problem when I add ssl
Post by: sokki on March 24, 2015, 12:24:33 PM
are you using purchase ssl or self signed?

Title: Re: Problem when I add ssl
Post by: mekosaad on March 24, 2015, 12:29:01 PM
I have to add this offer
https://www.comodo.com/e-commerce/ssl-certificates/free-ssl-certificate.php
Title: Re: Problem when I add ssl
Post by: brijendrasial on March 24, 2015, 02:24:36 PM
Why dont you redo whole process again?
Title: Re: Problem when I add ssl
Post by: mekosaad on March 24, 2015, 04:54:24 PM
Why dont you redo whole process again?

I do not understand I'm bad in the English
Title: Re: Problem when I add ssl
Post by: Administrator on March 24, 2015, 05:35:15 PM
try by generating a new SSL and installing it
Title: Re: Problem when I add ssl
Post by: mekosaad on March 24, 2015, 06:06:30 PM
I've created a new key ssl
But again Apache stop

Code: [Select]
Stopping httpd: [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using Server.111111.com for ServerName
[Tue Mar 24 18:17:07 2015] [warn] NameVirtualHost 11.22.33.44:80 has no VirtualHosts
[FAILED]

How do I turn Port ssl with Apache ???
Title: Re: Problem when I add ssl
Post by: brijendrasial on March 24, 2015, 06:27:49 PM
I dont think this error is related to ssl.
Title: Re: Problem when I add ssl
Post by: mekosaad on March 24, 2015, 06:29:49 PM
I dont think this error is related to ssl.

When I delete ssl for this site is working again Apache
Title: Re: Problem when I add ssl
Post by: brijendrasial on March 24, 2015, 07:06:39 PM
Can you please explain how you are generating and signing certificate?
Title: Re: Problem when I add ssl
Post by: mekosaad on March 24, 2015, 07:27:56 PM
Can you please explain how you are generating and signing certificate?

First you make a ssl certificate from SSL Generator
Second, download the file that was sent by the company comodo 11111_com.crt
To this place /etc/pki/tls/certs
Third, you have to enter this SSL Certs Manager
Also when I enter Location of Certificate files /etc/pki/tls/certs/
There data are is not empty like every time
Title: Re: Problem when I add ssl
Post by: brijendrasial on March 24, 2015, 07:50:09 PM
Now I am actually getting what issue you have. There is some bug in ssl generation process. Give me sometime I will try to explain you another way of adding ssl if possible.
Title: Re: Problem when I add ssl
Post by: brijendrasial on March 24, 2015, 07:57:50 PM
delete everything from this file: /usr/local/apache/conf.d/vhosts-ssl.conf

/etc/pki/tls/certs
delete your domain certificates files from here .crt,.cert,.bundle

/etc/pki/tls/private
delete your domain key file

Goto ssl generator fillin the entries and at the bottom also tick generate self signed certificate. Now generate ssl

Now this will generate csr, crt and key file.

Now you can goto ssl cert manager and complete rest of the process.
Title: Re: Problem when I add ssl
Post by: mekosaad on March 24, 2015, 09:00:27 PM
delete everything from this file: /usr/local/apache/conf.d/vhosts-ssl.conf

/etc/pki/tls/certs
delete your domain certificates files from here .crt,.cert,.bundle

/etc/pki/tls/private
delete your domain key file

Goto ssl generator fillin the entries and at the bottom also tick generate self signed certificate. Now generate ssl

Now this will generate csr, crt and key file.

Now you can goto ssl cert manager and complete rest of the process.

Problem is resolved Apache stop

Code: [Select]
Stopping httpd: [OK]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using Server.11111.com for ServerName
[OK]

But when I enter through Add https does not work site
Title: Re: Problem when I add ssl
Post by: brijendrasial on March 24, 2015, 09:09:05 PM
delete everything from this file: /usr/local/apache/conf.d/vhosts-ssl.conf

/etc/pki/tls/certs
delete your domain certificates files from here .crt,.cert,.bundle

/etc/pki/tls/private
delete your domain key file

Goto ssl generator fillin the entries and at the bottom also tick generate self signed certificate. Now generate ssl

Now this will generate csr, crt and key file.

Now you can goto ssl cert manager and on the right side you will see  Install SSL Certificate.

in certificate, choose yourdomain.cert
for user, choose username of account
path, specify correct path
domain, name of domain
 now click install ssl. This will enable ssl.

Open ur site with https and you will see error certificate means https is working.

on ssl cert manager page, scrool down and you will see option key, csr, cert,bundle, test. Replace content inside cert and bundle provided by comodo and restart apache (service httpd restart)
Title: Re: Problem when I add ssl
Post by: mekosaad on March 24, 2015, 09:28:48 PM
I use this site cloudflare
You activate the asset and you choose the full ssl (strict)

But the site does not work
Is this how displays a certificate provided by this site or Ahalhadh that you Baadvtha from the control panel

Error 526 Ray ID: 1cc56fec851d0bed
Invalid SSL certificate

Also the same message when I work for Apache Restart

Code: [Select]
Stopping httpd: [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using Server.11111.com for ServerName
[  OK  ]
Title: Re: Problem when I add ssl
Post by: brijendrasial on March 24, 2015, 09:49:30 PM
Yes, that message is displayed when ssl is not signed. http://awesomescreenshot.com/0234pmfef0
 
Well I am not creator of centos web panel. You can always get paid support just in 5$ from http://centos-webpanel.com/support-services.
Our primary business is to provide hosting to client, so your issue is out of my reach unless I have access to server.
Title: Re: Problem when I add ssl
Post by: mekosaad on March 25, 2015, 03:55:49 PM
ok thx
Title: Re: Problem when I add ssl
Post by: srqwebguy on May 14, 2015, 03:48:04 PM
I just experienced this exact same issue. BullTen, your info was extremely helpful and allowed me to resolve it. The solution didn't work at first until I realized I needed to use the newly generated CSR to re-key the cert with the Cert provider before replacing all the info in the three files, but once I figured that out we were free and clear.

Thank you.
Title: Re: Problem when I add ssl
Post by: xjlin0 on November 16, 2017, 06:03:17 AM
delete everything from this file: /usr/local/apache/conf.d/vhosts-ssl.conf

/etc/pki/tls/certs
delete your domain certificates files from here .crt,.cert,.bundle

/etc/pki/tls/private
delete your domain key file

Goto ssl generator fillin the entries and at the bottom also tick generate self signed certificate. Now generate ssl

Now this will generate csr, crt and key file.

Now you can goto ssl cert manager and complete rest of the process.

in AWS I have to use NAT mode, and after auto SSL of the user, the installing of Softaculous break the CWP, I had to use sh generate_hostname_ssl under terminal to restart CWP, but the certificate invalid.  brijendrasial's comments saved my server.  I didn't tick the self signed certificate in ssl generator.