Model Virtual Host

NameVirtualHost *

# The very first virtual host is the default one, NOT the 
# global DocumentRoot.  Hovewer, all virtual hosts will 
# inherit the configs from the global config (outside of 
# the VirtualHost directives).

<VirtualHost *>
        ServerName main.zgib.net
        # This will be the default serve location:
        DocumentRoot /var/www/
</VirtualHost>

<VirtualHost *>
        ServerName rkd.zgib.net
        ServerAlias *.elichs.dyndns.org elichs.dyndns.org
        DocumentRoot /path/to/rkdwww/
</VirtualHost>

Aliases and rewriting

        Alias /pchemwiki /srv/www/moin/moin.fcgi

mod_rewrite

This module does everything, so much that I can't quite document it right now.

bandwidth limiting

These instructions use mod_bandwidth, included with debian. I used the instructions at http://www.cohprog.com/v3/bandwidth/doc-en.html

Examples: {{{ BandWidthModule On # put this in each virtual host

}}}

Sometimes the server would get clogged down when doing this. I think that it forgets that old connections were closed, and thus limits the bandwidth more than it should. To remedy this, stop apache, clean out the files in tmp/apachebw, (or /var/lib/apache/mod-bandwidth/ on debian) (not the directories themselves), then restart apache. This made it fast again for me.

generating ssl keys

DebianNotes/ApacheConfig (last edited 2008-03-10 01:38:17 by localhost)