• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3161
  • Last Modified:

Apache Failed to Start

Apache Failed to Start

   Please help with the following Syntax error on line 107 of "htttp.conf" file
--------I have included a copy of the "httpd.conf" file -- where the error resides. = /bin/bash: line 1: nameserver: 192.168.200.2

>>>>>

[root@dhcppc0 root]# service httpd start

Starting httpd: Syntax error on line 107 of /etc/httpd/conf/httpd.conf:
Invalid command '/bin/bash:', perhaps mis-spelled or defined by a module not included in the server configuration
                                                           [FAILED]

[root@dhcppc0 root]# vi /etc/httpd/conf/httpd.conf
#
KeepAlive Off

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
/bin/bash: line 1: nameserver: 192.168.200.2

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
MaxClients       150
MaxRequestsPerChild  1000
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

# perchild MPM
# NumServers: constant number of server processes
# StartThreads: initial number of worker threads in each server process
# MinSpareThreads: minimum number of worker threads which are kept spare
"/etc/httpd/conf/httpd.conf" 1041L, 34896C                        109,1          8%
0
josenetwork
Asked:
josenetwork
  • 5
  • 3
  • 2
5 Solutions
 
ravenplCommented:
> /bin/bash: line 1: nameserver: 192.168.200.2
what this line is doing there? Remove it.
0
 
josenetworkAuthor Commented:
If i comment it : then try to start Apache = it still fails but no error output --- it only says FAILED

Do you know of parameters that i must check in order to get Apache started?
0
 
ravenplCommented:
try running: service httpd configtest
0
Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
ahoffmannCommented:
please post the last lines from your error_log file
0
 
josenetworkAuthor Commented:

Last login: Thu May  4 12:26:13 2006
[root@dhcppc0 root]# service httpd configtest
Syntax OK
[root@dhcppc0 root]#
0
 
josenetworkAuthor Commented:
Any suggestions ?
0
 
ahoffmannCommented:
any messages in error_log?
0
 
josenetworkAuthor Commented:
No messages in error log > here's the problem - i fixed it but i will like to change this....

look at the hostname = root@dhcppc0
   > well, thats not what i have in the /etc/hosts or /etc/sysconfig/network files --- i have the generic "localhosts.locadomai"n in those files

As soon as i input an entry on those files for dhcppc0 and input nameserver dhcppc in /etc/httpd/conf/htttpd.conf file = Apache starts and it works......


??? Does any one know what can be causing me to end up with root@dhcppc > no matter what i do??
0
 
ahoffmannCommented:
so the problem was a misconfigured /etc/hosts?
Then you should at least have one message in error_log before the exit message
0
 
josenetworkAuthor Commented:
Ok ahoffmann,

        Thank you for you help >

The problem is now fixed! --- no message in error_log

>>>??? Does any one know what can be causing me to end up with root@dhcppc > no matter what i do??

--- It was my DHCP server propagating this hostname off the DMZ = root@localhost is now the prompt since i statically assign an ip to Apache....


Thanks again....
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now