Control Web Panel

WebPanel => Apache => Topic started by: ally on March 29, 2018, 02:21:27 PM

Title: Apache SSL problem.
Post by: ally on March 29, 2018, 02:21:27 PM
Hello CWP community,

I want to enable the SSL supporting for the centos server powered by CWP pane.
From WebServers page I see that the apache is configured to work with both ports 80/443

https://www.screencast.com/t/vwHRIHyLnTzE

But in SSL Cert Manager I see message:

'Looks like your port 443 is NOT enabled in apache/httpd configuration!'
Whenewer I tried to enable SSL manually by adding
listen 443 into /usr/local/apache/conf.d/ssl.conf I got:

AH00526: Syntax error on line 4 of /usr/local/apache/conf.d/ssl.conf:
Cannot define multiple Listeners on the same IP:port

Would be glad for any help.
Title: Re: Apache SSL problem.
Post by: Igor S. on April 05, 2018, 06:17:34 AM
Hello.

Just install SSL certificate via CWP: Apache settings => SSL Cert Manager.
Title: Re: Apache SSL problem.
Post by: ally on April 10, 2018, 12:47:42 PM
Hello,

I have tried to install the SSL via "Apache settings => SSL Cert Manager".
https://www.screencast.com/t/4RbHivPUGa

The Let's Encrypt SSL was issued but apache still working just only on the 80 port, below output of the netstat:

[root@jurist ~]# netstat -ntpl | grep http
tcp        0      0 :::80                       :::*                        LISTEN      29115/httpd

also apache reloading did not help.

Title: Re: Apache SSL problem.
Post by: Igor S. on April 11, 2018, 06:25:11 PM
Hi, that's weird.
Try to add
Code: [Select]
Listen 443in /usr/local/apache/conf.d/ssl.conf

And check if you have not installed Apache from yum repo
Title: Re: Apache SSL problem.
Post by: ally on April 14, 2018, 07:51:35 AM
When I added:
Code: [Select]
Listen 443into /usr/local/apache/conf.d/ssl.conf file I got:

/usr/local/apache/bin/httpd -S
AH00526: Syntax error on line 4 of /usr/local/apache/conf.d/ssl.conf:
Cannot define multiple Listeners on the same IP:port

The file ssl.conf looks like:
<IfModule !ssl_module>
        LoadModule ssl_module modules/mod_ssl.so
        </IfModule>
        Listen 443
        SSLProtocol All -SSLv2 -SSLv3
        SSLHonorCipherOrder on
        SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS

Regarding:
Quote
And check if you have not installed Apache from yum repo

Code: [Select]
yum info cwp-httpd-2.4.29-2.x86_64
Installed Packages
Name        : cwp-httpd
Arch        : x86_64
Version     : 2.4.29
Release     : 2
Size        : 26 M
Repo        : installed
From repo   : cwp
Summary     : Apache httpd server
URL         : http://centos-webpanel.com
License     : Proprietary License
Description : Apache Web Server builded for CWP

So apache was installed from cwp repo.

Title: Re: Apache SSL problem.
Post by: studio4host on April 16, 2018, 08:36:14 AM
try to delete this file and then from cwp install certificate, it will autocreate a new file with correct settings
Code: [Select]
rm -f /usr/local/apache/conf.d/ssl.conf
if this doesn't help do also this
Code: [Select]
rm -f /usr/local/apache/conf/httpd.conf
and then reinstall cwp-httpd to get a new config
Code: [Select]
yum reinstall cwp-httpd
Title: Re: Apache SSL problem.
Post by: ally on April 17, 2018, 07:00:56 AM
Hello,

The problem was resolved after reinstalling cwp-httpd.
Thanks @studio4host for your help!

Best Regards
Ally L.
http://www.webhostingzone.org/