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!

Finding Apache

Status
Not open for further replies.

blaxsmith

ISP
Jun 6, 1999
2
US
All,

I have just started to learn PHP reading 'Beginning PHP4' and I am stuck on one thing. I am running Apache 1.3.20-16 on RH Linux 7.2.

There is a command to find where the location Apache stores its web site files. The command,

rpm -ql apache | grep /htdocs$

returns me to a command prompt, with no indication of where the files are stored. Using the command,

rpm -q apache

I know that Apache is installed on my system. Is there another command that I can type in to find the /htdocs folder, or are they stored somewhere else on my system? Or, is Apache not completely installed on my system?

Similarly, if I enter a command line entry to find the program 'apachectl',

rpm -ql apache | grep apachectl$

I also am not returned with a path to that program.

Using the command,

rpm -ql apache | grep /httpd.conf$

does return the path to where this file is stored.

Any help would be appreciated.
 
Hi,



Some of these you have to set up yourself. The default content directory is defined by the DocumentRoot directive in the httpd.conf control file (/etc/httpd/conf/httpd.conf on redhat). The default for redhat is :



DocumentRoot "/var/


I guess the problem you're having is with a book or other material that refers to certain default paths. Redhat packages apache in its own way and you may well find a few differences. For example, apachectl is a script used to stop / start the server, etc. Redhat does not include this because it has functionally similar sysv init scripts. For example :



/etc/rc.d/init.d/httpd start

/etc/rc.d/init.d/httpd stop

/etc/rc.d/init.d/httpd restart

/etc/rc.d/init.d/httpd status



With redhat apache the 'apache' rpm is a fairly complete server but you might want other add-on rpms like :



mod_perl

mod_php

mod_php3

apache_devel



If you don't like the way redhat have done it, you can always download the apache.org binaries and use those : . Or, better, download the source and compile / install yourself --> .



Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top