1

I've been trying to get my server up and running for a while now. I recently set up a centOS 6 server and I'm having issues with the Apache server. I had a domain up and running, everything worked fine. Then I tried adding domains via the virtual host setup. All of the sites ran but they only mirrored the original domain/document. I thought maybe the server needed to restart so I did. Now the server will not reload, restart, start or stop via standard httpd service commands. I would love to figure this out, please help. I think this is a standard apache server setup, nothing fancy.

NameVirtualHost *:80

<VirtualHost *:80>
   ServerAdmin [email protected]
   DocumentRoot "/home/george/public_html/drbeep.com/public/"
   ServerName www.drbeep.com
   ServerAlias drbeep.com
   ErrorLog /home/george/public_html/drbeep.com/logs/drbeep.com-error_log
   CustomLog /home/george/public_html/drbeep.com/logs/drbeep.com-access_log common
</VirtualHost>

<VirtualHost *:80>
   ServerAdmin [email protected]
   DocumentRoot  /home/george/public_html/aboodtobe.com/public/
   ServerName www.aboodtobe.com
   ServerAlias aboodtobe.com
   ErrorLog /home/george/public_html/aboodtobe.com/logs/aboodtobe.com-error_log
   CustomLog /home/george/Public_html/aboodtobe.com/log/aboodtobe.com-access_log common
</VirtualHost>

<VirtualHost *:80>
   ServerAdmin [email protected]
   DocumentRoot /home/george/public_html/tri-ingtimes.net/public/
   ServerName tri-ingtimes.net
   ServerAlias tri-ingtimes.net
   ErrorLog /home/george/public_html/tri-ingtimes.net/logs/tri_-ingtimes.net-error_log
   CustomLog /home/george/public_html/tri-ingtimes.net/logs/tri-ingtimes.net-access_log common
</VirtualHost>

2 Answers 2

0

You are lacking a NameVirtualHost *:80.

To kill apache, run killall <name-of-apache-executable>.

When you've fixed the above, run apachectl -S to verify your virtualhost setup.

1
  • I'm pretty sure I set up the virtual host correctly still, every time I try a service start or restart I get a "Failed" message. Also, when I check the syntax, I get a syntax ok. Also no errors on any line in the httpd conf file. I just cant get the httpd to turn on.
    – aboodness
    Mar 1, 2012 at 20:28
0

tri-ingtimes.net has the same ServerName and ServerAlias, which I didn't think would work. It did on my test server.

Adaptr's suggestion to do apachectl -S (or httpd -S depending on your distribution is a good one). That has helped me solved many a vhost issue.

Check that all directories in your docroot and log paths exist. A problem there will cause apache to not start.

2
  • ah ha! The log directories are probably the culprit. Thanks for the advice!
    – aboodness
    Mar 1, 2012 at 21:20
  • That was exactly the problem, I had a couple mistakes in the directories and the log files themselves needed to be created
    – aboodness
    Mar 2, 2012 at 6:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .