Author Topic: CWP7 - Apache won't start after changing hostname  (Read 9224 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
CWP7 - Apache won't start after changing hostname
« on: July 13, 2017, 10:03:02 PM »
I am new to CWP (but not to linux). I changed the hostname from the gui. That seemed to take, but on reboot, Apache won't start (and therefore no CWP!). From the logs, it seems to be SSL related. New self-signed files are in /etc/pki/tls/certs and private.

The messages and logs are below - any idea? If I disable the ssl apache conf files it will start. --- Dave

--->?>>
 

[root@aws-eip1 certs]# systemctl start httpd.service
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details. :-*

[root@aws-eip1 certs]# systemctl status httpd.service
● httpd.service - Web server Apache
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2017-07-13 18:32:04 ADT; 46s ago
  Process: 3914 ExecStart=/usr/local/apache/bin/apachectl start (code=exited, status=1/FAILURE)

Jul 13 18:32:03 aws-eip1.abbeyridgeobservatory.ca systemd[1]: Starting Web server Apache...
Jul 13 18:32:04 aws-eip1.abbeyridgeobservatory.ca systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 13 18:32:04 aws-eip1.abbeyridgeobservatory.ca systemd[1]: Failed to start Web server Apache.
Jul 13 18:32:04 aws-eip1.abbeyridgeobservatory.ca systemd[1]: Unit httpd.service entered failed state.
Jul 13 18:32:04 aws-eip1.abbeyridgeobservatory.ca systemd[1]: httpd.service failed.

From apache error_log:

[root@aws-eip1 logs]# tail error_log
[Thu Jul 13 18:32:04.001188 2017] [ssl:emerg] [pid 3916:tid 140482223884160] AH02561: Failed to configure certificate aws-eip1.abbeyridgeobservatory.ca:443:0, check /etc/pki/tls/certs/aws-eip1.abbeyridgeobservatory.ca.cert
[Thu Jul 13 18:32:04.001282 2017] [ssl:emerg] [pid 3916:tid 140482223884160] SSL Library Error: error:0906D06C:PEM routines:PEM_read_bio:no start line (Expecting: CERTIFICATE) -- Bad file contents or format - or even just a forgotten SSLCertificateKeyFile?
[Thu Jul 13 18:32:04.001298 2017] [ssl:emerg] [pid 3916:tid 140482223884160] SSL Library Error: error:140AD009:SSL routines:SSL_CTX_use_certificate_file:PEM lib
AH00016: Configuration Failed



Offline
*
Re: CWP7 - Apache won't start after changing hostname
« Reply #1 on: July 14, 2017, 07:13:49 PM »
Yes, it is related to SSL. Check your .conf file for the domain. At least that's what happened to me.

Offline
***
Re: CWP7 - Apache won't start after changing hostname
« Reply #2 on: July 15, 2017, 05:53:36 AM »
Also turn off the ssl for a while, start it and create new certificate.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...