[ale] Question about apache virtual hosts

Robert L. Harris Robert.L.Harris at rdlg.net
Wed Jan 3 11:02:03 EST 2007



If it helps, I have some vhosts set up like it looks like you're trying to do.
My config looks like this:

NameVirtualHost *
<VirtualHost *>
        ServerAdmin robert at rdlg.net

        ServerName www.rdlg.net
        DocumentRoot /var/www/RDLG.rdlg.net/htdocs/
        .
        .
        .Standard config for the main site here
        .
</VirtualHost>

<VirtualHost *>
        ServerAlias rdlg.net 
        redirect / http://www.rdlg.net/
</VirtualHost>

<VirtualHost *>
        ServerAlias wally.rdlg.net
        redirect / http://www.rdlg.net/
</VirtualHost>


<VirtualHost *>
        ServerAdmin robert at rdlg.net
        ServerName comics.rdlg.net
        ServerAlias comics.rdlg.net
        Redirect / http://www.rdlg.net/cgi-bin/comicsgen.pl
</VirtualHost>


Mainly note the NameVirtualHost and the <VirtualHost *>.  Also, this
is a Debian unstable system.

Robert


Thus spake Jim (ale_nospam at fayettedigital.com):

> What I'm trying to do is set up freedns' concept of a subdomain.  I
> think there may be more than one definition.  Anyway I have a freedns
> account and have established a subdomain of sub.maindomain.com which
> points to the same ip as maindomain.com.
> 
> In apache I have the following:
> NameVirtualHost 69.93.127.xxx:80
> 
> <VirtualHost 69.93.127.xxx:80>
>     DocumentRoot /home/k4gvo/public_html/
>     ServerName k4gvo.maindomain.com
>     <Directory /home/k4gvo/public_html/>
>         AllowOverride All
>         Options FollowSymLinks
>         Order allow,deny
>         Allow from All
>     </Directory>
> </VirtualHost>
> 
> What works is when I go to http://k4gvo.maindomain.com I see what I
> expect to see, the web page in k4gvo's public_html directory. 
> 
> What doesn't work is when I go to http://maindomain.com I see the same
> thing, not what is in /var/www.
> 
> What did I miss?
> 
> Some things have been changed to protect the innocent.
> Thanks,
> Jim.
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale

:wq!
---------------------------------------------------------------------------
Robert L. Harris                     | GPG Key ID: E344DA3B
                                         @ x-hkp://pgp.mit.edu
DISCLAIMER:
      These are MY OPINIONS             With Dreams To Be A King,
       ALONE.  I speak for              First One Should Be A Man
       no-one else.                       - Manowar

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature




More information about the Ale mailing list