Re: Troubleshooting namebased virtual websites

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OK, thank you.  I'll look into your suggestions. 
I do have a question about how default plays into this.  Can default be views as just another virtual host?

Currently, /sites-available/default  looks like this:
<VirtualHost *>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>


Is this correct? or would it be better to make it point to another directory, similar in structure to the other virtual sites, e.g. /var/www/default/{htdocs, cgi-bin, logs} ? or other suggestions?
And again, TY!

-J


On Tue, Jul 13, 2010 at 2:52 PM, Eric Covener <covener@xxxxxxxxx> wrote:
On Tue, Jul 13, 2010 at 2:43 PM, John Hudak <jjhudak@xxxxxxxxx> wrote:
> results of apache2ctl -S are:

You have
>
> apache2: Could not reliably determine the server's fully qualified domain
> name, using ubuntuserver.homeunix.com for ServerName
> [Tue Jul 13 14:26:22 2010] [warn] VirtualHost 2150sunshine.homeip.net:0
> overlaps with VirtualHost ubuntuserver.homeunix.com:0, the first has
> precedence, perhaps you need a NameVirtualHost directive

Your NameVirtualHost arguments doesn't exactly match your VirtualHost arguments

> [Tue Jul 13 14:26:22 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
> [Tue Jul 13 14:26:22 2010] [warn] NameVirtualHost *:80 has no VirtualHosts

This is the other side of "Your NameVirtualHost arguments doesn't
exactly match your VirtualHost arguments".


> VirtualHost configuration:
> 192.168.0.110:*        homeip.net
> (/etc/apache2/sites-enabled/2150sunshine.homeip.net:1)
> 127.0.0.1:*            homeunix.com
> (/etc/apache2/sites-enabled/ubuntuserver.homeunix.com:1)
> 24.3.xxx.xxx:*         homeunix.com
> (/etc/apache2/sites-enabled/homecontrol.homeunix.com:1)
>

You don't need to explicitly list IP's in VirtualHost unless you
really want Apache to care about the interface the request comes in
on.

Simple fixes:
*  Remove all but 1 NameVirtualHost *:80
*  change each <VirtualHost> to have an argument of *:80

--
Eric Covener
covener@xxxxxxxxx

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux