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
LVL 1
PampaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mikajCommented:
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

0
PampaAuthor Commented:
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....
0
EatEmAndSmileCommented:
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. :)
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

biardCommented:
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?
0
bernardhCommented:
It is the srm.conf that you need to edit, and replace the directory in the DocumentRoot section with your preferred directory and the DirectoryIndex section with your preferred start page. Then start the apache server.

In your srm.conf file:

DocumentRoot /usr/local/apache/htdocs
   :
   :
DirectoryIndex index.html index.shtml home.html

Good luck!

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
EatEmAndSmileCommented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.