Archiv verlassen und diese Seite im Standarddesign anzeigen : Apache2+NamedBasedVHost Portmix error
Guten Morgen zusammen.
Ich habe ein kleines Konfigurationsprobelm mit dem Apache2 unter Suse 9.1.
Ich habe mehrere Vhosts am laufen (ohne ssl) und möchte nun die IP-Adresse, also http://<IP>, mit ssl zum laufen bekommen. Die Vhosts sollen auf http bleiben!
Nun habe ich also den Apache mit SSL gestartet, Zertifikate erstellt und eine ssl-vhost.conf angelegt.
Früher hatte ich in meiner vhosts.conf auch ein
<VirtualHost <IP>>
...
...
...
</VirtualHost>
Das habe ich jetzt rausgenommen und dafür in der ssl-vhost.conf
<VirtualHost 213.239.202.67:443>
...
...
...
Dachte eigentlich das sollte so genügen, doch beim neustart erscheint folgende Fehlermeldung:
VirtualHost <IP>:443 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
Syntax OK
Shutting down httpd2 (waiting for all children to terminate) done
Starting httpd2 (prefork) [Thu Dec 02 08:47:04 2004] [error] VirtualHost <IP>:443 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
Was läuft hier falsch ?
Dankeschön !
Hallo.
Du musst die non SSL VirtualHosts dann tralala:80 nennen.
t.
die lauten derzeit: <VirtualHost domain.tld>
hätte ich dazu schreiben sollen...
Die Fehlermeldungen kenne ich. :) Richtig geht es so:
NameVirtualHost 199.199.199.199:80
<VirtualHost 199.199.199.199:80>
Servername domain1.de
ServerAlias www.domain1.de
DocumentRoot /var/www/domain1.de/
[...]
</VirtualHost>
<VirtualHost 199.199.199.199:80>
Servername domain2.de
ServerAlias www.domain2.de
DocumentRoot /var/www/domain2.de/
[...]
</VirtualHost>
NameVirtualHost 199.199.199.199:443
<VirtualHost 199.199.199.199:443>
Servername domain1.de
ServerAlias www.domain1.de
DocumentRoot /var/www/domain1.de/
[...]
</VirtualHost>
<VirtualHost 199.199.199.199:443>
Servername domain2.de
ServerAlias www.domain2.de
DocumentRoot /var/www/domain2.de/
[...]
</VirtualHost>
Die IP musst du natürlich an deinen Server anpassen. Weitere Informationen zu Vhosts findest du in der Apache 2.0 Dokumentation unter:
http://httpd.apache.org/docs-2.0/vhosts/
Vielen Dank für die Antwort ...
doch wenn ich die konfiguration so vorhnheme bekomme ich folgede ausgabe:
[Thu Dec 02 09:50:03 2004] [error] VirtualHost xxx.xxx.xxx.xxx:443 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Dec 02 09:50:03 2004] [error] VirtualHost xxx.xxx.xxx.xxx:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Dec 02 09:50:03 2004] [error] VirtualHost xxx.xxx.xxx.xxx:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Dec 02 09:50:03 2004] [error] VirtualHost xxx.xxx.xxx.xxx:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Dec 02 09:50:03 2004] [error] VirtualHost xxx.xxx.xxx.xxx:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Dec 02 09:50:03 2004] [error] VirtualHost xxx.xxx.xxx.xxx:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Dec 02 09:50:03 2004] [error] VirtualHost xxx.xxx.xxx.xxx:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Dec 02 09:50:03 2004] [error] VirtualHost xxx.xxx.xxx.xxx:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Dec 02 09:50:03 2004] [error] VirtualHost xxx.xxx.xxx.xxx:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Dec 02 09:50:03 2004] [error] VirtualHost xxx.xxx.xxx.xxx:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Dec 02 09:50:03 2004] [error] VirtualHost xxx.xxx.xxx.xxx:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Dec 02 09:50:03 2004] [warn] NameVirtualHost xxx.xxx.xxx.xxx:80 has no VirtualHosts
[Thu Dec 02 09:50:03 2004] [warn] NameVirtualHost xxx.xxx.xxx.xxx:443 has no VirtualHosts
Syntax OK
Nein, wenn du es richtig gemacht hättest, wie ich es geschrieben habe, würdest du diese Fehlermeldungen nicht bekommen. :rolleyes:
Paste bitte deine gesamte Apache-Konfiguration.
Bitte hier meine Konfig:
NameVirtualHost <IP>:80
#---------------------------------------------------------------------------------
<VirtualHost <IP>:80>
ServerAdmin webmaster@domain1.de
ServerName domain1.de
ServerAlias www.domain1.de
ErrorLog /var/log/apache2/userlogs/domain1_error_log
CustomLog /var/log/apache2/userlogs/domain1_access_log combined
DocumentRoot /srv/www/htdocs/websites/domain1.de/content/
ScriptAlias /cgi-bin/ /srv/www/htdocs/websites/domain1.de/cgi-bin/
<Directory /srv/www/htdocs/websites/domain1.de/content/>
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /srv/www/htdocs/websites/domain1.de/cgi-bin/>
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
#---------------------------------------------------------------------------------
<VirtualHost <IP>:80>
ServerAdmin webmaster@domain2.de
ServerName domain2.de
ServerAlias www.domain2.de
ErrorLog /var/log/apache2/userlogs/domain1_error_log
CustomLog /var/log/apache2/userlogs/domain1_access_log combined
DocumentRoot /srv/www/htdocs/websites/domain2.de/
ScriptAlias /cgi-bin/ /srv/www/htdocs/websites/domain1.de/cgi-bin/
<Directory /srv/www/htdocs/websites/domain2.de/>
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /srv/www/htdocs/websites/domain1.de/cgi-bin/>
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
#---------------------------------------------------------------------------------
NameVirtualHost <IP>:443
<VirtualHost <IP>:443>
ServerAdmin webmaster@domain2.de
ServerName <IP>
ErrorLog /var/log/apache2/userlogs/domain1_error_log
CustomLog /var/log/apache2/userlogs/domain1_access_log combined
DocumentRoot /srv/www/htdocs/websites/domain2.de/
ScriptAlias /cgi-bin/ /srv/www/htdocs/websites/domain1.de/cgi-bin/
<Directory /srv/www/htdocs/websites/domain2.de/>
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /srv/www/htdocs/websites/domain1.de/cgi-bin/>
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
ServerName <IP>
Die Option ServerName sollte einen Servernamen beinhalten, und nicht eine IP.
Hast du in der Apache-Konfiguration noch irgendwo eine weitere Konfigurationsdatei mit Vhosts included?
habe es also doch wohl so gemacht wie du vorschlugest...
Nein habe keine weiteren confs.
Ich möchte aber das wenn man http://<Ip> eingibt die ssl seite bekommt und nur dann.
Dankeschön.
Powered by vBulletin® Version 4.2.5 Copyright ©2024 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.