Мелочи жизни в Apache

Материал из RSU WiKi
(Различия между версиями)
Перейти к: навигация, поиск
 
Строка 1: Строка 1:
 
 
== Проброс внутреннего сервера через mod_proxy в мир ==
 
== Проброс внутреннего сервера через mod_proxy в мир ==
  
Строка 8: Строка 7:
 
   ProxyPass        / https://real.server.com:8050/
 
   ProxyPass        / https://real.server.com:8050/
 
   ProxyPassReverse  / https://real.server.com:8050/
 
   ProxyPassReverse  / https://real.server.com:8050/
 +
 +
== How does Apache determine which of your existing vhosts is the default? ==
 +
 +
Unless you've actually defined a default site, the first of your vhosts (alphabetically) will be shown when any non-defined website is asked for.
 +
 +
* If you have an existing or new site that you want to make your default site (shown when any of your domains or your IP that are not defined by a vhosts file is asked for), just rename that site's vhosts file so it is alphabetically the first (I just put a "!" at the beginning of the vhosts filename for that site).
 +
* If you have an existing site that you also want to come up when the IP is browsed, but not be your default site, just add the IP to a ServerAlias line for the existing site's vhost file.
 +
* If you have a specific site that will only be shown when the IP is requested by a browser, then create another vhosts file with your IP in the ServerName line instead of a domain name.
 +
 +
'''Example:'''
 +
 +
  0-default.conf
 +
  1-gallery.conf
 +
  2-blog.conf

Версия 16:30, 23 декабря 2006

Проброс внутреннего сервера через mod_proxy в мир

 ProxyRequests     Off
 SSLProxyEngine    On
 SSLProxyCACertificateFile conf/cacerts.crt
 ProxyPreserveHost On
 ProxyPass         / https://real.server.com:8050/
 ProxyPassReverse  / https://real.server.com:8050/

How does Apache determine which of your existing vhosts is the default?

Unless you've actually defined a default site, the first of your vhosts (alphabetically) will be shown when any non-defined website is asked for.

  • If you have an existing or new site that you want to make your default site (shown when any of your domains or your IP that are not defined by a vhosts file is asked for), just rename that site's vhosts file so it is alphabetically the first (I just put a "!" at the beginning of the vhosts filename for that site).
  • If you have an existing site that you also want to come up when the IP is browsed, but not be your default site, just add the IP to a ServerAlias line for the existing site's vhost file.
  • If you have a specific site that will only be shown when the IP is requested by a browser, then create another vhosts file with your IP in the ServerName line instead of a domain name.

Example:

 0-default.conf
 1-gallery.conf
 2-blog.conf
Личные инструменты
Пространства имён

Варианты
Действия
Навигация
Инструменты