Portal Home > Knowledgebase > Articles Database > Apache Failed Start
Apache Failed Start
Posted by entropy1980, 02-09-2012, 02:59 PM |
Thanks in advance for any and all help!
After a reboot we cannot get Apache to start, we are getting the following error:
[warn] NameVirtualHost 172.16.1..42:80 has no VirtualHosts
The config was setup by someone else so it's a little bit of a mess and I an not sure where to begin. Here's the config:
# Use name-based virtual hosting.
# Where do we put the lock and pif files?
LockFile "/var/lock/httpd.lock"
CoreDumpDirectory "/etc/httpd"
# Defaults for virtual hosts
# Logs
# Virtual hosts
# Virtual host Default Virtual Host
#
# ServerSignature email
# DirectoryIndex index.php index.html index.htm index.shtml
LogLevel warn
HostNameLookups off
#
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# Note that from this point forward you must specifically allow
# certain features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
Options FollowSymLinks
AllowOverride None
Options Indexes Includes FollowSymLinks
AllowOverride None
Allow from all
Order allow,deny
Options Indexes MultiViews
AllowOverride None
Allow from all
Order allow,deny
Options ExecCGI
AllowOverride None
Allow from all
Order allow,deny
NameVirtualHost 172.16.1.42:80
NameVirtualHost 172.16.1.36:80
#NameVirtualHost 172.16.1.42
Options -Indexes
AllowOverride All
Allow from all
Order allow,deny
DocumentRoot /var/www/store.mycompanyname.com/docs
ServerName store.mycompanyname.com
ErrorLog logs/store.mycompanyname.com-error_log
#CustomLog logs/store.mycompanyname.com-access_log common
CustomLog /var/www/store.mycompanyname.com/logs/access_log "%h %l %u %t \"%r\" %>s %b %A"
#
# Order Allow,Deny
# Allow from 67.139.30.2 172.16.1.36 71.133.214.71 localhost
#
DocumentRoot /var/www/store.mycompanyname.com/docs
ServerName store.mycompanynameww.com
ErrorLog logs/store.mycompanyname.com-error_log
#CustomLog logs/store.mycompanyname.com-access_log common
CustomLog /var/www/store.mycompanyname.com/logs/access_log "%h %l %u %t \"%r\" %>s %b %A"
Order Allow,Deny
Allow from 67.139.30.2 172.16.1.36 71.133.214.71 localhost
UseCanonicalName off
HostNameLookups on
#
# DocumentRoot "/var/www/store.mycompanyname.com/docs"
# ServerName store.mycompanynameww.com
# ErrorLog logs/store.mycompanynameww.com-error_log
# #CustomLog logs/store.mycompanynameww.com-access_log common
# CustomLog /var/www/store.mycompanynameww.com/logs/access_log "%h %l %u %t \"%r\" %>s %b %A"
#
# mailman should probably not be installed on this server as it has no known use.
Order deny,allow
Deny from all
DocumentRoot /var/www/store.mycompanyname.com/docs
ServerName store.mycompanynameww.com
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn
SSLEngine on
SSLProtocol +SSLv3 +TLSv1
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/httpd/conf/ssl.crt/store.mycompanynameww.com.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/store.mycompanynameww.com.key
SSLCertificateChainFile /etc/httpd/conf/ssl.crt/gd_bundle.crt
SSLOptions +StdEnvVars
SSLOptions +StdEnvVars
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
allow from all
Options +Indexes
#
# Order Allow,Deny
#
|
Posted by barbus, 02-09-2012, 03:46 PM |
Try to run
httpd -t
And it's not error, it's just a warning. Besides you can increase log verbosity by setting LogLevel to debug.
|
Posted by ssfred, 02-15-2012, 07:25 AM |
Such warnings will not hinder apache to start up. If there is any "error" messages then you need to check further as apache will not be restarted then. You can use the command provided by barbus to check configuration errors. The same can be achieved through /usr/local/apache/bin/apachectl configtest
|
Posted by m4rc3, 02-15-2012, 10:23 AM |
still, if you are not going to use that ip for virtual hosts then comment the "NameVirtualHost 172.16.1.42:80" directive.
|
Posted by rockgeeks, 02-15-2012, 10:43 AM |
Please refer the following tutorial for your more help http://www.cyberciti.biz/faq/apache2...-virtualhosts/
|
Add to Favourites Print this Article
Also Read