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

Status
Not open for further replies.

KhB

Technical User
Feb 6, 2001
11
FR
I would like to set a httpd.conf and I'm confused with all the derictives, I will appreciate if somebody tell me which derictives
are absolutely necessary to put in httpd.conf to start the server correctly.

thanks

KB

 
Firstly, take a look at your /etc/httpd/httpd.conf file - most of what you need to know is in the header!

The most important directives are the ones which tell Apache where your files are.

ServerName should contain your server's host name

ServerRoot should contain the path to the bin, error and log files e.g. "/usr/local/httpd"

DocumentRoot should contain the path to where your web files will be served from (i.e. where your index.htm file is) - the default is usually "/usr/local/httpd/htdocs"

You also need a default <Directory> statement which points to the same path as DocumentRoot.
e.g. <Directory &quot;/usr/local/httpd/htdocs&quot;>

ScriptAlias should point to wherever your cgi-bin directory is stored. This only matters if you are using cgi scripts as part of your web site functionality.

e.g. ScriptAlias /cgi-bin/ &quot;/usr/local/httpd/cgi-bin&quot;

That's pretty well all that you have to change to set up a new server unless you are straight into Perl scripting and virtual servers!

Best advice is probably to make sure your site is in /usr/local/httpd/htdocs and then the default settings for all but ServerName should work.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top