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

Basic Apache

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Well I have just installed R.H. 7.1 with the apache server. I am very new to this. What do I need to get it going? and what conf. file tells me where to put the Html documents?

Do I have start it or will it start on the boot up, and do I have to compile something? If someone could give me just some basic getting started information that would be great!
 
Ok, ...

First, here is the info for apache, go to for help/docs...

RH 7.1 places (by default) all webpages in /var/ but this can be moved, or symbolically linked anywhere you want.
*ALL* apache's configuration info is in
/etc/httpd/conf/httpd.conf

PLEASE BACK UP THIS FILE BEFORE MESSING WITH IT!!!
cd /etc/httpd/conf
cp httpd.conf httpd.conf.backup

Now you can play with it and if it blows up you can back out :)

RH doesnt start apache by default... so as root do the following

chkconfig --level 345 httpd on
which sets apache to start at boot

now to start apache without rebooting type (as root)

/etc/init.d/httpd start

Dont forget to read the docs !!!

---
John Hoke
If you found this post helpfull, please click below and let us know!
 
So the html file are not kept in the /etc/httpd/conf directory and you have to start the server, this all makes sense as to why it is not working. Please more basics would be great!
 
I meant that's where your html files go (Not sure about on Redhat though)
 
Hi,

It is the same on redhat. The default content directory is defined by the DocumentRoot directive in your /etc/httpd/conf/httpd.conf file. So, for example, the test page at is physically :

/var/
If you had a physical file /var/ it would be accessed as , etc, etc.

Redhat 7.2 ships with a gui tool called 'apacheconf' which you can use if you like rather than delveing straight into the httpd.conf file with an editor . See -->
Also, remember that after any change made to httpd.conf you have to 'signal' apache to re-read the config file to register the changes. This is most easily done as root by :

killall -HUP httpd

or if you prefer :

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

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top