1

I'm on a clean install of Centos 7, and after setting up a VirtualHost for Apache, it fails to start. There are no obvious errors in journalctl -xe but here is the output regardless.

-- Unit httpd.service has begun starting up.
Sep 30 23:28:41 vps97148.vps.ovh.ca systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 30 23:28:41 vps97148.vps.ovh.ca kill[1424]: kill: cannot find process ""
Sep 30 23:28:41 vps97148.vps.ovh.ca systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 30 23:28:41 vps97148.vps.ovh.ca systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Sep 30 23:28:41 vps97148.vps.ovh.ca systemd[1]: Unit httpd.service entered failed state.
Sep 30 23:28:41 vps97148.vps.ovh.ca systemd[1]: httpd.service failed.
Sep 30 23:28:41 vps97148.vps.ovh.ca polkitd[1082]: Unregistered Authentication Agent for unix-process:1408:672266 (system bus name :1.29, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)

httpd -t and apachectl configtest tell me that my syntax is OK.

apachectl -S gives no output.

Here is my domainname.com.conf:

<VirtualHost *:80>
    ServerName domainname.com
    DocumentRoot /var/www/domainname.com/public_html
    ErrorLog /var/www/domainname.com/error.log
    CustomLog /var/www/domainname.com/requests.log combined
</VirtualHost>

Is there any help for me or can anyone tell me what I'm doing wrong?

Here's some more information.

At the bottom of the top-level config I have a line that says Include sites-enabled/*.conf and this is where my domainname.com.conf is located.

The directories for the logs do exist, and I can access the logs.

DocumentRoot does point to a directory. The server can resolve the ServerName entry, and it points back to the server's IP

  • Have a look at the logfiles at /var/log/httpd. – Thomas Oct 1 '16 at 8:34
  • And also show the output of "apachectl -S" and possibly "apachectl configtest" – Unbeliever Oct 1 '16 at 10:16
  • Can your server resolve the ServerName entry "domainname.com"? Do the directories for the log files exist? – roaima Oct 1 '16 at 20:13
  • Is DocumentRoot pointing to a directory? – roaima Oct 1 '16 at 20:14
  • If "apachectl -S" gives no output at all, then the files with your virtual hosts in are not being read by Apache (otherwise there would be some output). Check the top level configuration file for "Include" directives. – Unbeliever Oct 2 '16 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.