Link to home
Start Free TrialLog in
Avatar of Pampa
Pampa

asked on

Apache + Linux RedHat 6.0

I'am trying Apache in Linux RedHat.
I have a strange problem.

Apache works fine, except for one thing:

I'am starting the server like this:
/usr/local/apache/httpd/src/httpd -f /usr/local/apache/conf/httpd.conf

In the httpd.conf I have:
ServerRoot "/usr/local/apache/htdocs"
IndexRoot  Index.html

But when the server starts
The WebServer starts from to /home/httpd/html/index.html

I try to start manually (so I'am sure I use the correct httpd.conf file, but the problem persist)

How can I check where Apache is taking this path as the default directory?

Any other ideas?

Thanks
Avatar of mikaj
mikaj

Server root tell apache, where to write log files etc.. (like /usr/local/apache).
You must use DocumentRoot to tell apache where html docs are.
You must also use DirectoryIndex instead of IndexRoot.

##Sample
ServerRoot /usr/local/apache
DocumentRoot /usr/local/apache/htdocs
DirectoryIndex index.html

Avatar of Pampa

ASKER

Mikaj
I already have this variables pointing to the correct directory.
ServerRoot /usr/local/apache....

But the program keep on going to "/home/httpd/html/index.html"

How can I check why is doing this?
I'am sure I'am using the correct httpd.conf....
Did you reinstall your Apache? If so, make sure your /etc/rc.d is not calling the previous Apache, that is configured to the other path. It happened to me once. :)
Also, make sure there are not multiple DirectoryRoot entries in the httpd.conf file.  And what does linuxconf show?  When you run linuxconf, what does it say under Apache Web Server...Defaults for DocumentRoot?
ASKER CERTIFIED SOLUTION
Avatar of bernardh
bernardh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The srm.conf file is deprecated. If it actually contain something that could be annoying you, you should consider cleaning this file and configuring everything on httpd.conf.