ひびろぐ ver.2

Google検索したときの見た目を考慮してブログ名を変更してみた。馬鹿かと阿呆かと。

Archive for 6月 15th, 2008


VirtualHost + ReverseProxy で参考にしたサイトをメモ

VirtualHost + ReverseProxy

なんとなくApacheの設定の理解が3割り増しになった気がする。たぶん幻覚。

以下、ReverseProxy鯖の設定例。

  1. /awstats へのアクセスはReverseProxy鯖自信のawstatsへ(アクセス解析情報の閲覧)
  2. specialuser.example.net でアクセスされた場合は無条件でvmserverに飛ばす
  3. ~specialuser もvmserverに任せる(specialuser.example.net/~specialuserに飛ばす)
  4. その他は192.168.0.n = example.net鯖が担当

「リクエストが どの ServerName ディレクティブにもマッチしない場合、 一番最初の VirtualHost により扱われます」とのことなので、2番目を下に独立させた。

~specialuserとspecialuser.example.netで名前が一致しているのがキモイかもしれないけど、あとはたぶん普通?


NameVirtualHost *:80
	

	ServerAdmin www-admin@example.net
	ServerName example.net
	
	# awstatsを動かす場所ではCGIが実行できるようにする
	
		Options ExecCGI
		AllowOverride None
		Order allow,deny
		Allow from all
		# 知らない人にのぞかれちゃいやん
		AuthType Basic
		AuthName “private”
		AuthUserFile “/path_to_awstats/.htpasswd.awstats”
		require valid-user
	
	Alias /awstats-icon/ “/path_to_awstats/icon/”
	ScriptAlias /awstats/ “/path_to_awstats/cgi-bin/”
	
	# /awstats にはProxyルールを適用しない
	ProxyPass /awstats !
	# 3番目のルール
	ProxyPass /~specialuser http://vmserver/~specialuser
	ProxyPassReverse /~specialuser http://vmserver/~specialuser
	# 4番目のルール
	ProxyPass / http://192.168.0.n/
	ProxyPassReverse / http://192.168.0.n/
	
	ErrorLog /var/log/httpd-all-error_log
	CustomLog /var/log/httpd-all-access_log common

	
# specialuser.example.net鯖の設定(単純な名前ベースVirtualHost)

	ServerAdmin www-admin@example.net
	ServerName specialuser.example.net
	ProxyPass           / http://vmserver/
	ProxyPassReverse    / http://vmserver/
	ErrorLog /var/log/httpd-specialuser-error_log
	CustomLog /var/log/httpd-specialuser-access_log common

鯖を色々といじった。

主にサークル内部向けだけど、結構手を入れた。

関係ない部分に影響が出ていなければいいなぁ。


そんなわけで、何かおかしいモノを見かけたらご連絡ください。


まぁあれだ、作業内容を半分くらいは忘却しているのが問題。メモ仕切れねえ。

防火壁とVirtualHost

ApacheのVirtualHost機能を使うときに、上位の防火壁でポート変換をしているとよろしくない模様。

具体例は後で出すとして、なんだろうなぁこれ?

Alt+Tabの悲劇

20080615

駄目だ、どれが何だか判別できねえ。

apacheメモ:Proxy

vhostと併用しようとしたらうまく飛んでくれなかった。上位に更に防火壁があると良くない?

httpd.confのケツの方に直接ProxyPass/ProxyPassReverseを書いてとりあえず解決?

apacheメモ:mod_include

[error] an unknown filter was not added: includes

っていうログがなんだろうと思ったら、

mod_include

モジュールが無効だったっぽい。


参考サイト:No.572 SSI動かへん。 - Linux で自宅サーバ [ Home Server Technical. ]

egather2.exeが24時に死ぬ件

なんとなく寿命が近い気がするThinkPadX40、24時になるとegather2.exeが突然死するんだがなんだろう?


と、メモしておく。