"Andy Zbikowski (Zibby)" <zibby at ringworld.org> writes:

> Well, here's what Scott had:
> 
> NameVirtualHost 209.134.132.36
> 
> <VirtualHost 209.134.132.36>
> ServerName www.fireopal.org
> ServerAlias fireopal.org
> ServerAlias *fireopal.org
> ServerAdmin webmaster at fireopal.org
> DocumentRoot /var/www/
> ServerName www.fireopal.org
> ErrorLog /var/log/apache/error.log
> </VirtualHost>
> 
> <VirtualHost 209.134.132.36>
> ServerName www.ytilaer.com
> ServerAlias ytilaer.com
> ServerAlias *.ytilaer.com
> ServerAdmin webmaster at fireopal.org
> DocumentRoot /var/www/host.ytilaer.com
> ServerName www.ytilaer.com
> ErrorLog /var/log/apache/host.ytilaer.com-error.log
> TransferLog /var/log/apache/host.ytilaer.com-access.log
> </VirtualHost>
> 
> Here is what I think should work:
> 
> NameVirtualHost 209.134.132.36
> 
> <VirtualHost 209.134.132.36:80>
> ServerName fireopal.org
> ServerAdmin webmaster at fireopal.org
> DocumentRoot /var/www/
> ErrorLog /var/log/apache/error.log
> </VirtualHost>
> 
> <VirtualHost 209.134.132.36:80>
> ServerName ytilaer.com
> ServerAdmin webmaster at fireopal.org
> DocumentRoot /var/www/host.ytilaer.com
> ErrorLog /var/log/apache/host.ytilaer.com-error.log
> TransferLog /var/log/apache/host.ytilaer.com-access.log
> </VirtualHost>
> 
> Corrections:
> 1> Specify port

Not necessary if it's the default port (80), which it is.

> 2> ServerAliais and duplicate ServerName removed.

ServerName is crucial for a by-name virtual host; that's how Apache
tells them apart.

> 3> Shortened ServerName to just the domain so that anything.fireopal.org
> or anything.ytilaer.com pointed to his IP will pull up the correct page.

I've never tried wildcards there, don't know if it works.

This fragment does work:

    NameVirtualHost 63.224.10.74

    # Default host root
    <VirtualHost 63.224.10.74>
    ServerName www.dd-b.net
    ServerAdmin webmaster at dd-b.net
    DocumentRoot /usr/users/httpd/html/
    ScriptAlias /cgi-bin /usr/users/httpd/cgi-bin
    Alias /sharedicons /usr/users/httpd/html/icons
    Alias /shared /usr/users/httpd/shared
    ReWriteEngine on
    ReWriteLog /var/log/httpd/rewrite
    ReWriteLogLevel 0
    ReWriteRule ^/RKBA http://www.a-human-right.com/
    ReWriteRule ^/RKBA/(.*) http://www.a-human-right.com/$1
    ReWriteRule ^/olegv/(.*) http://www.olegvolk.net/$1
    ReWriteRule ^/olegv http://www.olegvolk.net/
    </VirtualHost>

    # Minn-StF web pages can have their own private virtual server
    <VirtualHost 63.224.10.74>
    ServerName www.mnstf.org
    ServerAdmin webmaster at mnstf.org
    DocumentRoot /usr/users/httpd/Minn-StF/html
    UserDir disabled
    Alias /mnstf /usr/users/httpd/Minn-StF/html
    ScriptAlias /cgi-bin /usr/users/httpd/cgi-bin
    Alias /sharedicons /usr/users/httpd/html/icons
    Alias /shared /usr/users/httpd/shared
    Include /www/Minn-StF/twiki/httpd.twiki-conf
    </VirtualHost>

    # Remap an accidentally-released address April 2001
    <VirtualHost 63.224.10.74>
    ServerName minicon.mnstf.org
    ServerAdmin webmaster at mnstf.org
    UserDir disabled
    ReWriteEngine on
    ReWriteLog /var/log/httpd/rewrite
    ReWriteLogLevel 0
    ReWriteRule ^/(.*) http://www.mnstf.org/minicon/$1
    </VirtualHost>

    <VirtualHost 63.224.10.74>
    ServerName www.demesne.com
    ServerAdmin webmaster at demesne.com
    DocumentRoot /usr/users/httpd/html/test
    UserDir disabled
    ScriptAlias /cgi-bin /usr/users/httpd/cgi-bin
    Alias /sharedicons /usr/users/httpd/html/icons
    Alias /shared /usr/users/httpd/shared
    </VirtualHost>

*I* think the problem has something to do with one webroot being
beneath the other one; because one of Scott's earlier posts quoted an
error specifically listing that from the log file.  But is that error
still happening?

Anyway, Scott, my suggestion is to *try* un-nesting the web roots, and
see if that does help.

> Unresolved Question (not important to get a working apache, might be nice
> to have a cleaner config):
> 
> [andyzb at chewie:~]# host 209.134.132.36
> Name: sraun.static.iaxs.net
> Address: 209.134.132.36
> 
> As it stands, 209.134.132.36 or sraun.static.iaxs.net are useable in the
> NameVirtualHost and VirtualHost options. I think you can use anything you
> want if you add the correct entries in /etc/hosts. Am I wrong?

I've always just done it by IP, so I'm not sure what the limits are.
I *think* that any name that resolves is usable here, and that
"resolves" includes in /etc/hosts if your resolver is configured that
way. 

> He couldn't use host.fireopal.org if reverse-dns isn't setup or it isn't
> defined in /etc/hosts. Or does host.fireopal.net just need to be a dns
> entry (not reverse dns)?

I do not believe that reverse DNS is required for that, just
forwards. 
-- 
David Dyer-Bennet      /      Welcome to the future!      /      dd-b at dd-b.net
SF: http://www.dd-b.net/dd-b/          Minicon: http://www.mnstf.org/minicon/
Photos: http://dd-b.lighthunters.net/