Virtual Domains - Additional Items
(Page 3 of 4 )
Now lets add some other necessary items. Most of these are self explanatory.
ServerAdmin you@yoursite.com ErrorLog /var/log/httpd/yoursite-error_log TransferLog /var/log/httpd/yoursite-access_log |
Now if you want to have an executable directory for cgi/perl scripts you need to make a directory in your document root for your scripts to be placed I always use cgi-bin
Here is what you need in your virtual hosts file for an executable directory
ScriptAlias /cgi-bin/ /var/www/sites/yoursite/cgi-bin/ |
If you want to password protect files with .htaccess you need the following lines.
<Directory "/var/www/sites/yoursite"> Options Indexes Includes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> |
This is always cool to have your own custom 404 error file you can also specify this in your virtual.
ErrorDocument 404 /var/www/sites/yoursite/notfound.html |
Next: Putting it all together >>
More Miscellaneous Articles
More By Codewalkers