SORU
16 Aralık 2011, Cuma


Apache başka bir port yönlendirme

Bir süre için bu ile mücadele ettik ve kesinlikle yanlış bir şey yapıyorum.

Apache server ile aynı makine üzerinde JBoss server var. Mydomain.com trafik localhost:8080/örnek JBoss yönlendirmek istiyorum. DNS şu anda mydomain.com kur ve tarayıcı içine girdiğinde düz port 80 olacak.

Benim soru nasıl belirli bir etki alanı adı apache geldiği zaman farklı bir port yönlendirme yapmak (bu durumda, "") mydomain.com?

<VirtualHost ip.addr.is.here> 
  ProxyPreserveHost On
  ProxyRequests Off
  ServerName mydomain.com
  ProxyPass http://mydomain.com http://localhost:8080/example
  ProxyPassReverse http://mydomain.com http://localhost:8080/example
</VirtualHost> 

GÜNCELLEŞTİRİLMİŞ w/ Öneriler - Hala bağlantı noktası 8080 yönlendirme değil

<VirtualHost *:80> 
  ProxyPreserveHost On
  ProxyRequests Off
  ServerName mydomain.com
  ServerAlias www.mydomain.com
  ProxyPass http://mydomain.com http://localhost:8080/example
  ProxyPassReverse http://mydomain.com http://localhost:8080/example
</VirtualHost> 

CEVAP
26 EKİM 2012, Cuma


ProxyPass ve Li etki alanı http://example.com dışarıda bırakın ve / gibi bırakmak gerekir. Ayrıca, yönlendirme olduğu için example/ sonunda / gitmelisin. Ayrıca, http://www.example.com vs http://example.com - tek www ile bazı sorunlar ServerName yaptım kadar çalıştım www.example.com ve ServerName, example.com. Aşağıdaki bir gitmek vermek.

<VirtualHost *:80> 
  ProxyPreserveHost On
  ProxyRequests Off
  ServerName www.example.com
  ServerAlias example.com
  ProxyPass / http://localhost:8080/example/
  ProxyPassReverse / http://localhost:8080/example/
</VirtualHost> 

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • InsideBlackBerry

    InsideBlackB

    14 Aralık 2009
  • Within Temptation

    Within Tempt

    18 EYLÜL 2006
  • wwjoshdu

    wwjoshdu

    18 ŞUBAT 2011