TWiki> CF Web>Software>WebServerConfiguration (revision 1)EditAttach

Web Server Configuration

This page is for information about how to configure the main CS webservers.

Virtual Host Configuration

Each virtual host is configured in a separate config file which is included into the main httpd.conf.

Here is an example one:

<VirtualHost *:80>
        ServerName example.uwaterloo.ca

        DocumentRoot /software/wwwdata_cs.uwaterloo.ca/data/vhosts/example
</VirtualHost>
<VirtualHost *:80>
        ServerName www.example.uwaterloo.ca
        ServerAlias www.example example
        Redirect permanent / http://example.uwaterloo.ca/
</VirtualHost>

This would be placed in /software/wwwdata_cs.uwaterloo.ca/data/vhosts/example.conf in the core.cs environment.

Note that this file contains two virtual hosts. The first is the "real" one, and would also contain any host-specific directives that are needed. It has a single ServerName directives and no ServerAlias directives. The second handles alternate names that also refer to the same virtual host. These should all be redirected as shown to the canonical name. Note that the .uwaterloo.ca can be omitted from anywhere on campus (or anywhere that has .uwaterloo.ca specified as a search domain) so it is important to redirect these shorter versions of the name to the canonical name.

-- IsaacMorland - 06 May 2006

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2006-05-06 - IsaacMorland
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback