NetBSD-Users archive

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

Re: Apache with VitualHost ?



The Error Message it's this
   
Diese Seite kann nicht angezeigt werden.
  • Vergewissern Sie sich, dass die Webadresse http://hometime.ch stimmt.
  • Suchen Sie die Seite mit Ihrer Suchmaschine.
  • Aktualisieren Sie die Seite in ein paar Minuten


#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
ServerAdmin webmaster%caloro.ch@localhost
 DocumentRoot "/usr/pkg/share/httpd/htdocs/caloro.ch/"
 ServerName caloro.ch
 ServerAlias www.caloro.ch
<Directory "/usr/pkg/share/httpd/htdocs/caloro.ch/">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
#        <IfModule dir_module>
#                DirectoryIndex index.html
#        </IfModule>
 ErrorLog /var/log/httpd/caloro_error.logs
 TransferLog /var/log/httpd/caloro_trans.logs
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster%homeshine.ch@localhost
 DocumentRoot /usr/pkg/share/httpd/htdocs/homeshine.ch/
 ServerName homeshine.ch
 ServerAlias www.homeshine.ch
<Directory "/usr/pkg/share/httpd/htdocs/homeshine.ch/">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
#       <IfModule dir_module>
#               DirectoryIndex index.html
#       </IfModule>
 ErrorLog /var/log/httpd/homeshine_error.logs
 TransferLog /var/log/httpd/homeshine_trans.logs
</VirtualHost>
hp7900#

but i dont have any Error logs from Apache
thanks for your Help!
Mauri


Am 26.10.2013 16:25, schrieb Manuel Bouyer:
On Sat, Oct 26, 2013 at 03:11:53PM +0100, Matthias Scheler wrote:
[Snip-http.conf]
# Virtual hosts
Include etc/httpd/httpd-vhosts.conf

[Snip-http-Vhost.conf]
NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin webmaster%caloro.ch@localhost
[...]
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster%homeshine.ch@localhost
[...]
</VirtualHost>
You don't want 2 default virtualhost.
Change the second one to
<VirtualHost homeshine.ch:80>
I have to disagree. "VirtualHost" only defines which listen address a
virtual host applied to. And "*" means all of them which is definitely
correct here.

I'm using "VirtualHost *:80" respectively "VirtualHost *:443" for all
virtual hosts with Apache 2.4 without problems. The same configuration
worked fine when I was still using Apache 2.2.
I'm using NameVirtualHost, this may be the difference.

I guess it matches the Host HTTP header against ServerName then ?




Home | Main Index | Thread Index | Old Index