[Tfug] Good Apache Tutorials for Subdomains?
George Cohn
gwcohn at simplybits.net
Tue Feb 20 06:32:57 MST 2007
Christopher Robbins wrote:
> I've got O'Reilly's Apache Cookbook in my office, but I'm having a hell of a
> time setting up subdomains on a SuSE 10.2 webserver.
>
> Does anyone have any links to a good virtual host tutorial?
>
> Thanks,
>
> -Chris
>
If you mean setting up multiple domains to be hosted on a single
machine, with apache 2 it goes something like this:
<VirtualHost 192.168.254.4:80>
ServerName server1.example.com
ServerAdmin admin at example.com
ServerAlias *.example.com
ErrorLog /var/log/apache2/error.log
DocumentRoot /home/example
ScriptAlias /cgi-bin/ /home/example/cgi-bin/
AddHandler cgi-script .cgi .pl
<Directory "/home/example/cgi-bin">
AllowOverride None
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
<Directory "/home/example">
Options Indexes FollowSymLinks +Includes
IndexOptions FancyIndexing VersionSort NameWidth=*
XBitHack on
Order allow,deny
Allow from all
</Directory>
Just build a config for each domain and use the sites-enabled command to
activate them.
Here's a link to a how-to that might be what you are looking for:
http://www.howtoforge.com/perfect_setup_opensuse_10.2
George Cohn
More information about the tfug
mailing list