Question

I am very new in using Linux. I am using Centos 7 of vmware. I wanted to start the httpd but i am facing some problems. Please help.

[root@tbcl conf]# systemctl status -l httpd ● 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-03-27 21:28:14 BDT; 1min 3s ago Docs: man:httpd(8) man:apachectl(8) Process: 5590 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE) Process: 5589 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE) Main PID: 5589 (code=exited, status=1/FAILURE)

Mar 27 21:28:14 tbcl httpd[5589]: AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 192.168.176.129. Set the ‘ServerName’ directive globally to suppress this message Mar 27 21:28:14 tbcl httpd[5589]: (98)Address already in use: AH00072: make_sock: could not bind to address 192.168.176.129:80 Mar 27 21:28:14 tbcl httpd[5589]: no listening sockets available, shutting down Mar 27 21:28:14 tbcl httpd[5589]: AH00015: Unable to open logs Mar 27 21:28:14 tbcl systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Mar 27 21:28:14 tbcl kill[5590]: kill: cannot find process “” Mar 27 21:28:14 tbcl systemd[1]: httpd.service: control process exited, code=exited status=1 Mar 27 21:28:14 tbcl systemd[1]: Failed to start The Apache HTTP Server. Mar 27 21:28:14 tbcl systemd[1]: Unit httpd.service entered failed state. Mar 27 21:28:14 tbcl systemd[1]: httpd.service failed.

[root@tbcl conf]# systemctl start httpd Job for httpd.service failed because the control process exited with error code. See “systemctl status httpd.service” and “journalctl -xe” for details.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

@zahedjoy009

What’s the output of systemctl status httpd.service showing as of right now?

Quick note:

<virtualHost *:80>

should be:

<VirtualHost *:80>

Capital V.

@zahedjoy009

ln -s /etc/apache2/conf-available/servername.conf /etc/apache2/conf-enabled/servername.conf

@zahedjoy009

The issue is this line:

Mar 27 21:28:14 tbcl httpd[5589]: no listening sockets available, shutting down

Something else is listening on port 80/443, thus Apache fails to start as you can’t have two services listening on the same port at the same time.

You’ll want to run:

netstat -ltnp | grep ':80'

… to see what else is listening on that port and kill the process, otherwise Apache will continue to fail to start.

Once you find the process, you can either shutdown the service, or use kill -9 to kill off the process using the id.

i.e.

kill -9 id

Where id is the process ID. Once the process is killed off, you can then start or restart Apache and it should work.

As a general note, please keep in mind this community designed for DigitalOcean customers as well as potential future customers, so while we can help with general linux issues like this one, there may be some issues we can’t help with since DigitalOcean does not use VMWare.