mod_vhost_alias conflicting with VirtualHost containers

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

 



Hi people, I have a problem with mod_vhost_alias conflicting with
VirtualHost containers. This is the relevant part of my conf

Listen 127.0.0.1:80
Listen 127.0.0.1:443
UseCanonicalName Off

<Directory "/var/www/localhost/htdocs">
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

<IfModule alias_module>
	ScriptAlias /cgi-bin/ "/var/www/localhost/cgi-bin/"
</IfModule>

<Directory "/var/www/localhost/cgi-bin">
	AllowOverride None
	Options None
	Order allow,deny
	Allow from all
</Directory>

NameVirtualHost 127.0.0.1:80
NameVirtualHost 127.0.0.1:443

### Vhost_alias

    <VirtualHost *:80>
        ### Permissions
        <Directory "/var/www/vhosts">
            Options -Indexes FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
        ### Dynamic Virtual Host Definitions
        #<IfModule mod_vhost_alias.c>
            VirtualDocumentRoot
/var/www/vhosts/%-2.1/%-2.0.%-1.0/htdocs/%-3+/
            VirtualScriptAlias 
/var/www/vhosts/%-2.1/%-2.0.%-1.0/htdocs/%-3+/cgi-bin
            ### CGI Directives
            <DirectoryMatch "^/var/www/vhosts/[^/]+/cgi-bin">
                AllowOverride None
                Options ExecCGI
                <IfModule mod_access.c>
                    Order allow,deny
                    Allow from all
                </IfModule>
            </DirectoryMatch>
        #</IfModule>
    </VirtualHost>

ServerAdmin admin@localhost
ServerName localhost
DocumentRoot "/var/www/localhost/htdocs"
#<VirtualHost 127.0.0.1:80>
#	DocumentRoot "/var/www/localhost/htdocs"
#    ServerAdmin root@localhost
#    ServerName localhost
#</VirtualHost>

... now:

if i have the last five lines commented out, apache complains (at start) that

[Mon Oct 08 15:07:17 2007] [warn] NameVirtualHost 127.0.0.1:80 has no
VirtualHosts
[Mon Oct 08 15:07:17 2007] [warn] NameVirtualHost 127.0.0.1:443 has no
VirtualHosts

but the vhost_alias mappings work just fine. unfortunatelly i dont have a
"default" virtualhost to serve requests comming directly to my server's ip
(wget http://127.0.0.1/ -> 404 error).

if i uncomment the last 5 lines, apache stops complaining, wget
http://127.0.0.1/ happily shows the index page of located in
/var/www/localhost/htdocs/index.htm, but serves this page unfortunately
for the vhost_alias domains too (vhost_alias domains overridden by the
virtualhost container).

any suggestions/help please?
running gentoo/apache-2.2.6

Pavel





---------------------------------------------------------------------
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