差分
この文書の現在のバージョンと選択したバージョンの差分を表示します。
次のリビジョン | 前のリビジョン | ||
web:usermin:start [2011/08/05 23:58] yuki 作成 |
— (現在) | ||
---|---|---|---|
ライン 1: | ライン 1: | ||
- | ====== apache proxy + usermin ====== | ||
- | Apache Proxyを使用してuserminとURL的に共存する。 | ||
- | <note> | ||
- | * Ubuntu 10.04 Server | ||
- | * 対外ドメイン : www.ainoniwa.net | ||
- | * Usermin経由で各ユーザのLDAPパスワード変更だけを出来るようにする。 | ||
- | </note> | ||
- | |||
- | - userminのインストール | ||
- | * <code>wget http://downloads.sourceforge.net/project/webadmin/usermin/1.470/usermin_1.470_all.deb | ||
- | dpkg -i usermin_1.470_all.deb</code> | ||
- | - 簡単セッティング(もちろん、ログインしてWebUIから設定してもいい) | ||
- | * <code>cd /etc/usermin | ||
- | </code> | ||
- | * ポート番号とUsermin無効ユーザの設定 | ||
- | * <code>sdiff -s miniserv.conf miniserv.conf.old | ||
- | port=10001 | port=10000 | ||
- | denyusers=root guest < | ||
- | </code> | ||
- | * パスワード変更以外の操作は無効に。 | ||
- | * <code>sdiff -s webmin.acl webmin.acl.old | ||
- | user: changepass | user: at changepass chfn commands cron cshrc fetchmail file f | ||
- | </code> | ||
- | * パスワード参照をfileではなくLDAP(このへんは/etc/nsswitch.confとpamで対応) | ||
- | * <code>sdiff -s changepass/config changepass/config.old | ||
- | passwd_cmd= | passwd_cmd=file | ||
- | </code> | ||
- | * <code>cat /etc/pam.d/usermin | ||
- | #%PAM-1.0 | ||
- | @include common-auth | ||
- | @include common-account | ||
- | @include common-password | ||
- | @include common-session</code> | ||
- | * ApacheのProxy経由でアクセスしても問題ないように。 | ||
- | * <code>sdiff -s config config.old | ||
- | lang=ja_JP.euc < | ||
- | webprefix=/lab/usermin < | ||
- | webprefixnoredir=1 < | ||
- | referer=127.0.0.1 < | ||
- | </code> | ||
- | - Aapche側の設定 | ||
- | * Proxyモジュールの有効化 | ||
- | * <code>a2enmod proxy | ||
- | echo "LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so" >> /etc/apache2/mods-available/proxy.load | ||
- | </code> | ||
- | * Proxyモジュールの設定 | ||
- | * <code><Proxy *> | ||
- | AddDefaultCharset off | ||
- | Order deny,allow | ||
- | Deny from all | ||
- | Allow from all | ||
- | </Proxy></code> | ||
- | * sites-avaliableの設定 | ||
- | * <code> cat default-ssl | grep Proxy | ||
- | SSLProxyEngine On | ||
- | ProxyPass /lab/usermin/ https://127.0.0.1:12241/ | ||
- | ProxyPassReverse /lab/usermin/ https://127.0.0.1:12241/ | ||
- | </code> | ||
- | - 再起動 | ||
- | * <code>service apache2 restart | ||
- | service usermin restart | ||
- | </code> |