Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

httpd.conf - which one do I use?

Status
Not open for further replies.

linuxtricks

IS-IT--Management
May 24, 2000
111
US
I have been modifying pages on my newly configured Apache server... when I noticed the changes weren't published.

I immediately checked my httpd.conf file to see what was happening. It read the following:
DocumentRoot "/usr/local/apache/htdocs"

Which is where I've been saving pages to, and where I like it.

However, upon further investigation, I noticed that there is another httpd.conf file in another directory... which happens to be the one Apache is accessing.

The one I thought Apache was using:
[red]/usr/local/apache/conf/httpd.conf[/red]

The one Apache is really using:
[red]/etc/httpd/conf/httpd.conf[/red]

My 1st question is:
Why are there (2) copies of this file?

2nd question:
Because I have modified the first file already, is there someway to point apache to the file I modified?

Thank you for any help you can give.

-halfcircles

[sig]<p> <br><a href=mailto: > </a><br><a href= > </a><br><i>try not!</i><br>
<i>do... or do not. there is no try!</i>[/sig]
 
I don't know why it made two copies, but I'd suggest copying the file you modified to the one apache is using and then deleting the one you originally modified and making a link to the other &quot;ln -s /etc/httpd/conf/httpd.conf
/usr/local/apache/conf/httpd.conf&quot;
Hope this helps :) [sig]<p>Jon Zimmer<br><a href=mailto:b0rg@pcgeek.net>b0rg@pcgeek.net</a><br><a href= Aetea Information Technology</a><br>The software required `Windows 95 or better', so I installed Linux.<br>
[/sig]
 
It sounds like you probably installed Apache from a tarball when it was already installed on the system, most likely from an RPM.

From your command prompt, run this command:

rpm -q apache

It should give you a list of an RPMs installed that begin with apache as the name
If you see something like apache-1.3.12
type in this command:
rpm -e apache-1.3.12

It will probably list some other packages that are dependant on apache, so you will need to rpm -e <package name> for each of them, and the try to remove the apache rpm again.

The RPM version of apache normally uses /etc/httpd while the tarball version normally uses /usr/local/apache

Hope this helps,
Gerald

[sig][/sig]
 
d3funct and gerald,

Thank you very much. gerald pinpointed my problem exactly. After removing all of the [red]rpms[/red]... everything went back to normal. =)
thanks again.
-halfcircles [sig]<p> <br><a href=mailto: > </a><br><a href= > </a><br><i>try not!</i><br>
<i>do... or do not. there is no try!</i>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top