problem with apache after compile using /scritps/easyapache

gxhosting

Member
Aug 12, 2004
7
0
151
CentOS 4

Hello there. Apache refuses to start after using WHM or /scripts/easyapache (unless I use option 8)
THis is what I get after compile:

/usr/sbin/httpd restart: httpd not running, trying to start
Syntax error on line 2 of /usr/local/apache/conf/httpd.conf:
Invalid command 'Alias', perhaps mis-spelled or defined by a module not included in the server configuration
/usr/sbin/httpd restart: httpd could not be started

This is part of apache output:

##
Alias /bandwidth/ /usr/local/bandmin/htdocs/
## httpd.conf -- Apache HTTP server configuration file
##

#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/> for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# After this file is processed, the server will look for and process
# /usr/local/apache/conf/srm.conf and then /usr/local/apache/conf/access.conf

If I delete or comment out Allias line it would tell me about problem with other lines (that contain modules like:


# LoadModule foo_module libexec/mod_foo.so
LoadModule env_module libexec/mod_env.so
LoadModule config_log_module libexec/mod_log_config.so
LoadModule mime_module libexec/mod_mime.so
LoadModule negotiation_module libexec/mod_negotiation.so
LoadModule status_module libexec/mod_status.so
LoadModule includes_module libexec/mod_include.so
LoadModule autoindex_module libexec/mod_autoindex.so
LoadModule dir_module libexec/mod_dir.so
LoadModule cgi_module libexec/mod_cgi.so
LoadModule asis_module libexec/mod_asis.so
LoadModule imap_module libexec/mod_imap.so
LoadModule action_module libexec/mod_actions.so
LoadModule userdir_module libexec/mod_userdir.so
LoadModule alias_module libexec/mod_alias.so
LoadModule access_module libexec/mod_access.so
LoadModule auth_module libexec/mod_auth.so
LoadModule setenvif_module libexec/mod_setenvif.so
LoadModule bandwidth_module libexec/mod_bandwidth.so

Please Help.

P.S. is there a command that give output for the whole httpd.conf file?

Thank you very much.
 

gxhosting

Member
Aug 12, 2004
7
0
151
I did with option 8 in /scripts/easyapache
However after I try to compile something more than bare bones apache, apache refuses to start.
 

qrees

Member
May 28, 2006
11
0
151
I also have some problems with easyapache. After cancelling (yes, cancelling) easyapache begun to compile php and after that i had:

Code:
/etc/rc.d/init.d/httpd start: httpd started
Waiting for httpd to restart.........finished.


httpd has failed, please contact the sysadmin.
Running "/etc/init.d/httpd restart" worked, but still why it didn't work before? and why php was recompiled?
 

mofachu

Registered
Feb 14, 2007
3
0
151
I also have some problems with easyapache. After cancelling (yes, cancelling) easyapache begun to compile php and after that i had:

Code:
/etc/rc.d/init.d/httpd start: httpd started
Waiting for httpd to restart.........finished.


httpd has failed, please contact the sysadmin.
Running "/etc/init.d/httpd restart" worked, but still why it didn't work before? and why php was recompiled?
Yet another victim of easyapache here. I was down for almost 11 hours rolling back, recompiling apache, running /usr/local/apache/bin/apachectl configtest and editing /etc/httpd/conf/httpd.conf and of course scouring these forums. With the exception of finding this thread all the other efforts were a waste of time. All from a script that supposedly had an exit menu option which implied disregard changes.

note that /usr/local/apache/bin/apachectl configtest will pass a mangled httpd.conf as long as it has good syntax whereas /etc/init.d/httpd restart gives the error messages that take you right to the problem

In my case it seems the update broke bandmin so the Alias directive at line 2 in
/usr/local/apache/conf/httpd.conf needed to moved within the <IfModule mod_alias.c> section.
Code:
<IfModule mod_alias.c>
Alias /bandwidth/ /usr/local/bandmin/htdocs/  ## This line was found at the top of the file and moved here to fix it
 

expedio

Active Member
Jun 30, 2007
36
0
56
As said by mofachu,

/etc/init.d/httpd start

This is the good way to pinpoint errors with httpd.conf. If httpd is crashed and you're unable to find the configuration errors, you can try to restore the backups from /etc/httpd/conf/
 

Spiral

BANNED
Jun 24, 2005
2,020
8
193
As said by mofachu,

/etc/init.d/httpd start

This is the good way to pinpoint errors with httpd.conf. If httpd is crashed and you're unable to find the configuration errors, you can try to restore the backups from /etc/httpd/conf/
Actually there is a specific command for that ....

/usr/local/apache/bin/apachectl configtest
 

bigrollerdave

Registered
Nov 28, 2006
3
0
151
I know this thread was started last year but I have to just say thanks. My server was down for about 9 hours until I read this thread.