Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have setup up virtualnamehosts on my server and I do not recieve any errors when starting apache but when I check to see if it has started it says:

httpd dead but pid file exists

thanks for the help.

also here is my config:

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier 
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost *:80>
DocumentRoot /var/www/html
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
ServerAdmin blah@blah.com
DocumentRoot /var/www/html
ServerName mysite.com
ServerAlias www.mysite.com
ErrorLog /var/log/httpd/mysite.com/error_log
CustomLog /var/log/httpd/mysite/access_log common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin blah@blah.com 
DocumentRoot /var/www/savvyParts
ServerName mysite2.com
ServerAlias www.mysite2.com
ErrorLog /var/log/httpd/mysite2.com/error_log
CustomLog /var/log/httpd/mysite2.com/access_log common
</VirtualHost>
share|improve this question
1  
Error log says...? –  Ignacio Vazquez-Abrams May 10 '12 at 4:04
1  
You should really look in the apache error log. ´/var/log/httpd´ or something like that. –  chutz May 10 '12 at 4:06
    
turns out it couldnt find my error log folder thanks guys –  arrowill12 May 10 '12 at 4:12
    
hah. I was just posting about the path problem in the config you pasted, and you got there before me. –  Tom H May 10 '12 at 4:26
add comment

1 Answer

To test the config for correctness you use the following command;

 # service httpd configtest
 Syntax OK

I tried your test config and I got some path errors;

# service httpd configtest
Warning: DocumentRoot [/var/www/savvyParts] does not exist
Syntax OK

and it wouldn't start after that.

So First Check the paths for your DocumentRoot and paths actually exists

If this does not fix the problem then you should provide the output of the following command;

 # cat /var/log/httpd/error_log

[Thu May 10 05:22:00 2012] [notice] Digest: done
[Thu May 10 05:22:00 2012] [notice] SSL FIPS mode disabled
[Thu May 10 05:22:00 2012] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.11 mod_ssl/2.2.22 OpenSSL/1.0.0h-fips configured -- resuming normal operations

also you can start httpd from the command line as root, and watch for any other startup errors;

# /usr/sbin/httpd
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
share|improve this answer
1  
Well of course /var/www/savvyParts is not going to exist on your server. –  EEAA May 10 '12 at 4:28
    
oops. me feel silly. –  Tom H May 10 '12 at 4:29
    
I bet you do. :) –  EEAA May 10 '12 at 4:29
    
interesting, i just tried configtest and it doesn't appear to test the Log directories until something needs to be logged, so I would be interested in a check for that –  Tom H May 10 '12 at 4:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.