Trouble with HTTPD

Issues related to applications and software problems
Post Reply
hodor
Posts: 6
Joined: 2017/05/11 13:42:06

Trouble with HTTPD

Post by hodor » 2017/06/19 15:20:56

Httpd stopped working one morning. The following is the status

Code: Select all

 systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2017-06-19 11:17:06 EDT; 16s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 4757 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 4755 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 4755 (code=exited, status=1/FAILURE)

Jun 19 11:16:56 hodor systemd[1]: Starting The Apache HTTP Server...
Jun 19 11:17:01 hodor httpd[4755]: AH00548: NameVirtualHost has no effect and will be remove...nf:1
Jun 19 11:17:06 hodor httpd[4755]: AH00526: Syntax error on line 5 of /etc/httpd/conf.d/docs.conf:
Jun 19 11:17:06 hodor httpd[4755]: Invalid command 'SSLCertificateFile', perhaps misspelled ...tion
Jun 19 11:17:06 hodor systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jun 19 11:17:06 hodor kill[4757]: kill: cannot find process ""
Jun 19 11:17:06 hodor systemd[1]: httpd.service: control process exited, code=exited status=1
Jun 19 11:17:06 hodor systemd[1]: Failed to start The Apache HTTP Server.
Jun 19 11:17:06 hodor systemd[1]: Unit httpd.service entered failed state.
Jun 19 11:17:06 hodor systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
I tried reinstalling the serivce. Could you help me to get the service running? Thank you!

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: Trouble with HTTPD

Post by stevemowbray » 2017/06/19 15:48:49

It's telling you there's a syntax error, and in which file it occurs.

hodor
Posts: 6
Joined: 2017/05/11 13:42:06

Re: Trouble with HTTPD

Post by hodor » 2017/06/20 15:28:45

stevemowbray wrote:It's telling you there's a syntax error, and in which file it occurs.
Thank you. Fixed the error in the conf file as the recent update caused this issue.

http test sites are working fine. For https, getting the following error

Code: Select all

Secure Connection Failed

An error occurred during a connection to site.example.com. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG

    The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
    Please contact the website owners to inform them of this problem.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Trouble with HTTPD

Post by TrevorH » 2017/06/20 15:51:21

That's often the error you get when trying to use https:// but the server is sending you non-https traffic. I'd recheck what you "fixed".
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

hodor
Posts: 6
Joined: 2017/05/11 13:42:06

Re: Trouble with HTTPD

Post by hodor » 2017/06/20 16:15:43

TrevorH wrote:That's often the error you get when trying to use https:// but the server is sending you non-https traffic. I'd recheck what you "fixed".
Thank you. Reinstalled mod_ssl and removed Namevirtual hosts from *.conf file. Here is my conf file,

Code: Select all

<VirtualHost *:443>
SSLEngine On
SSLCertificateFile /etc/httpd/ssl/****.crt
SSLCertificateKeyFile /etc/httpd/ssl/****.key
SSLCertificateChainFile /etc/httpd/ssl/****.crt

ServerAdmin ****
ServerName ****

DocumentRoot /var/www/html/services/***

</VirtualHost>

<VirtualHost ****>
DocumentRoot /var/www/html/services/****
Redirect permanent / https://****

ServerName ****
</VirtualHost>
I removed Listen 443 from vhost.conf. If it is included httpd service fails to start.

Code: Select all

[root@hodor ~]# apachectl configtest
Syntax OK

Post Reply