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.
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 "/usr/local/httpd/htdocs">
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/ "/usr/local/httpd/cgi-bin"
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.