ラベル apache2 の投稿を表示しています。 すべての投稿を表示
ラベル apache2 の投稿を表示しています。 すべての投稿を表示

2011年3月22日火曜日

自分自身の別ポートへリバースプロキシ

a2enmod proxy
a2enmod proxy_http

proxyだけだとダメでproxy_httpも有効化する必要がある。

proxy.conf

proxy.confを編集。proxy_httpは編集するものは無い

# If you want to use apache2 as a forward proxy, uncomment the
# 'ProxyRequests On' line and the  block below.
# WARNING: Be careful to restrict access inside the  block.
# Open proxy servers are dangerous both to your network and to the
# Internet at large.
#
# If you only want to use apache2 as a reverse proxy/gateway in
# front of some web application server, you DON'T need
# 'ProxyRequests On'.

#ProxyRequests On
#
#        AddDefaultCharset off
#        Order deny,allow
#        Deny from all
#        #Allow from .example.com
#

# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
#ProxyVia Off

        ProxyRequests Off
        
               Order deny,allow
               Allow from all
        
        ProxyPass /stream http://127.0.0.1:9999
        ProxyPassReverse /stream http://127.0.0.1:9999

        ProxyVia On


2011年3月21日月曜日

ubuntuのapache2でモジュールを有効化する

mods-enableからmos-availableへシンボリックリンクを張ってからapache2をrestartさせりゃいいんだが、専用のコマンドがある。
sudo a2enmod hogehoge

2011年2月20日日曜日

chrome 9.0.597.98(Windows版) で DirectoryIndex が効かない。

/ 直下は動くけど、
/hogehoge/ の場合は動いてない。

閲覧:chrome 9.0.597.98 (on Windows XP Home)
サーバ:ubuntu 10.10 apache2

原因不明。

ubuntu 10.4 LTSのchromiumでは普通に動いたりしたので当該バージョンだけのピンポイントな現象なのかもorz.

FireFox 3.6.13(Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 (.NET CLR 3.5.30729))でも問題なし。