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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to locate httpd.conf file 4

Status
Not open for further replies.

vistor

Technical User
Dec 22, 2000
164
US
Hi all ! how to locate httpd.conf file in a server
 
Depending on distro and install :
/etc/httpd
or (more common)
/usr/local/httpd/
Never seen it anywhere else ;
find / -name httpd.conf
to find it for sure.
 
Actually if you compile Apache with the default Unix layout, it's
Code:
/usr/local/apache/conf/httpd.conf
, but most Linux pre-packaged installs place it at
Code:
/etc/httpd/httpd.conf

It's funny, but you actually answered your own question. Just type in "locate httpd.conf", and you will get a list of all locations your server has that file. This is assuming that your server is running the "locate" file indexer, which is pretty common on Unix/Linux installs these days. Generally "locate" is updated once a day by a cron job which runs the script "updatedb" to index all the files on your system. This allows for a very fast search on file locations, but it is necessarily accurate with up-t-the-minute information for files that have been changed during the day. If you get an error while running "locate", then try to su to root, and run "updatedb" yourself, which will build the initial index to search from.
 
rycamor is right, my fault-usr/local/apache is what I was thinking of...

Bye
 
You could always have done
find / -name httpd.conf

And found it easily :)

man find for more info ...

-jph ---
John Hoke
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top