v0.10, December 2, 2008
Copyright Stuart Reedy 2002-2008
These are just random notes that I've made about running Apache. Everything here assumes you've installed Apache (version 2.2.x) my way--using the prefix /home/httpd/--so if you didn't, you're on your own!
Typically, I run the httpd service of Apache as its own userid:
httpd
This is easily done:
and with a special group: www
The above example sets the uid and gid to "the next available"
(whatever that means). If you want to set specific values, use:
User httpd
Group www
groupadd -g 377 www
This example uses 377 for both the uid and gid. You'll want to replace 377 with your value(s).
useradd -g www -u 377 httpd
II) Making .shtml files (server-parsed html) work
This is really easy! Edit the file /home/httpd/conf/httpd.conf as follows:
AddType text/html .shtml
Options Indexes FollowSymLinks Includes
DirectoryIndex index.html index.shtml
XBitHack Full
With this option, any .html files marked as executable will be parsed.
AddOutputFilter INCLUDES .shtml
Somewhere between <Directory /home/httpd/htdocs> and </Directory>, just put the line:
(To make a file executable just use: chmod a+x filename)
III) Testing the config file:
When you make changes to httpd.conf, you can check these changes using:
/home/httpd/bin/apachectl configtest
Final note:
Any time you edit the file /home/httpd/conf/httpd.conf, you must restart the
web server to activate the changes. Try:
/home/httpd/bin/apachectl restart
last updated 12-02-2008 09:13 by Stuart Reedy
Copyright Stuart Reedy 2002-2008
All rights reserved