Anzeige - [Hier werben / Mediadaten]
(?) Tags raten (?) apache, konfiguration, virtualhosts (edit)
 
Reply to this topicStart new topicStart Poll
> Brauche Hilfe bei Apache 2 Konfigurartion, Hilfe zu Virtualhosts
zubi
Geschrieben am: Mo 21.02.2005, 12:13
Report PostQuote Post

AyomRank 2
****

Gruppe: Member (aktiv)
Beiträge: 11
Mitglied seit: 8.07.2004


Habe folgendes Problem und könnte etwas Hilfe brauchen:

Voraussetzungen
- Tomcat Server mit Apache als Proxy.
- Applikation (Website) muss über https:// laufen.
- Haben rund 5 Domainen, aber nur SSL Zertifikat für 1 Domäne,
da für alle Domänen 1 Zertifikat gekauft werden muss und dies
zu teuer ist, machen wir halt redirect permanent auf die SSL Domäne.

Hier die Konfiguration:

CODE

# http
Listen 80
# https
Listen 443

SSLMutex default
SSLRandomSeed startup builtin
SSLSessionCache none

# alt:
# NameVirtualHost 192.168.130.3:80
# neu:
NameVirtualHost *:80

# 1. Virtualhost .com Redirect auf https://www.mydomain.com
<VirtualHost www.mydomain.com:80>
ServerName www.mydomain.com.com:80
ServerAdmin webmaster@mydomain.com
# Redirect auf https
Redirect permanent / https://www.mydomain.com
ErrorLog logs/error.log
CustomLog logs/access.log combined
</VirtualHost>

# 2. Virtualhost .ch Redirect auf https://www.mydomain.com/mandateChange.do?mandate_ctrl=CH:de
<VirtualHost www.mydomain.ch:80>
ServerName www.mydomain.ch:80
ServerAdmin webmaster@mydomain.com
# Direkter Aufruf deutsche Sprache
Redirect permanent / https://www.mydomain.com/mandateChange.do?mandate_ctrl=CH:de
ErrorLog logs/error.log
CustomLog logs/access.log combined
</VirtualHost>

# 3. Virtualhost
<VirtualHost www.mydomain.de:80>
ServerName www.mydomain.de:80
ServerAdmin webmaster@mydomain.com
# Spezialfall, soll zur Zeit auf anderen Server redirected werden
Redirect / http://www.foo.com
# Folgende Zeile: Versucht ein Document Root zu setzen um redirect
# über index.html mit meta redirect
#DocumentRoot C:/Prg/Apache2/htdocs/redirect
ErrorLog logs/error-de.log
CustomLog logs/access.log combined
</VirtualHost>

# 4. Virtualhost .ch Redirect auf https://www.mydomain.com/mandateChange.do?mandate_ctrl=UK:en
<VirtualHost www.mydomain.uk:80>
ServerName www.mydomain.uk:80
ServerAdmin webmaster@mydomain.com
# Direkter Aufruf englische Sprache
Redirect permanent / https://www.mydomain.com/mandateChange.do?mandate_ctrl=UK:en
ErrorLog logs/error.log
CustomLog logs/access.log combined
</VirtualHost>

# 5. Virtualhost Port: 443 https
<VirtualHost 192.168.130.3:443>
ServerName www.mydomain.com:443
ServerAdmin webmaster@mydomain.com  
ProxyPass /participant http://localhost:8080/participant
ProxyPassReverse /participant http://localhost:8080/participant
SSLEngine on
SSLCertificateFile conf/ssl/www.mydomain.com.crt
SSLCertificateKeyFile conf/ssl/www.mydomain.com.key
ErrorLog logs/error.log
CustomLog logs/access.log combined
</VirtualHost>


Bei der Eingabe von https://www.mydomain.com läuft alles wie es sollte.
Ebenso wenn http://www.mydomain.com eingegeben wird. (Redirect permanent auf https geht also)

Wenn aber http://www.mydomain.ch oder http://www.mydomain.uk eingegeben wird, dann sollte ja entweder auf https://www.mydomain.com/mandateChange.do?mandate_ctrl=CH:de oder https://www.mydomain.com/mandateChange.do?mandate_ctrl=UK:en redirected werden.
Es wird aber nur auf https://www.mydomain.com redirected. Im error.log finde ich folgenden Eintrag:

CODE
[warn] VirtualHost www.mydomain.ch:80 overlaps with VirtualHost www.mydomain.de:80, the first has precedence, perhaps you need a NameVirtualHost directive


oder auch so was

CODE
[Mon Feb 21 09:32:29 2005] [warn] NameVirtualHost *:80 has no VirtualHosts

Bzw. das gleiche so wenn httpd.conf so aussieht:

CODE

# alt:
NameVirtualHost 192.168.130.3:80
# neu:
# NameVirtualHost *:80

[Mon Feb 21 09:25:30 2005] [warn] NameVirtualHost 192.168.130.3:80 has no VirtualHosts


Irgendwie scheint meine VirtaulHost Konfiguration nicht so der Hit zu sein. Bin dankbar für Tips & Tricks.

Gruss

Boris Zuberbühler
Top
PMEmail Poster
Top
 
 
Roger Bobst
calac gmbh
#2 Geschrieben am: Mo 21.02.2005, 13:06 (+00:52)
Report PostQuote Post

AyomRank 5
Group Icon

Gruppe: Experten Entwicklung (Mod)
Beiträge: 426
Mitglied seit: 15.02.2004


Hallo

Ich würde folgendes ändern:

1. NameVirtualHost *
2. Jeder Vhost wird dann so definiert:
<VirtualHost *>
3. Die Domain, auf welche der vhost hört wird mit Servername definiert:
Servername www.mydomain.com -> kein port, nur den namen
4. der ssl vhost ist dann
<VirtualHost *:443>

Hoffe, das hilft mal ein wenig weiter
Gruss
Roger
Top
PMEmail PosterUsers Website
Top
 
zubi
#3 Geschrieben am: Mo 21.02.2005, 13:25 (+00:18)
Report PostQuote Post

AyomRank 2
****

Gruppe: Member (aktiv)
Beiträge: 11
Mitglied seit: 8.07.2004


Thx Roger

Hat geklappt!!! biggrin.gif

Musste allerdings den VirtualHost für SSL so lassen:

<VirtualHost 192.168.130.3:443>

So hat's nicht geklappt:

<VirtualHost *:443>

Besten Dank nochmal für schnelle und kompetente Hilfe.

Gruss

Boris

Top
PMEmail Poster
Top
 
Thema wird von 0 Benutzer(n) gelesen (0 Gäste und 0 anonyme Benutzer)
0 Mitglieder:
Trackback-Url: http://www.ayom.com/track/t/6174

Topic Options Reply to this topicStart new topicStart Poll

 


> Ähnliche Themen
Kleine DB-Hilfe gewünscht? Japs 118 6 Fr 21.11.2008, 17:12
PTC-Hilfe.de Hilfe zum Thema Pay to Click Zak 85 0 Di 4.11.2008, 21:42
Ich brauche Hilfe zu Suchmaschinen! xe0n 177 5 Do 30.10.2008, 15:09
Brauche dringend Rat, was soll diese email? alex72 357 8 So 26.10.2008, 12:54
Hilfe zum Thema "Kontaktformular" einsteiger 540 23 Mo 13.10.2008, 16:38
mod_proxy: Erfahrungen mit diesem Apache-Modul jAuer 259 2 Fr 10.10.2008, 09:24
Apache ErrorLog milkboy 225 4 Fr 3.10.2008, 09:19
(S) TFT-Monitor HILFE Mark_L 172 7 Mi 1.10.2008, 23:10
Hallo an alle! Brauche Starthilfe! Marc B. 284 5 So 28.09.2008, 23:10




Anzeige - [Hier werben / Mediadaten]



Anzeigen


[Hier werben / Mediadaten]