/* About ----- This directory contains extra files to make the 'fancy urls' feature even more fancier, by eliminating the 'index.php'-part of the URL Installation ------------ 1. Copy all files in this directory (except for index.html) to your main nucleus dir (where your index.php and action.php file are) If you have an already existing .htaccess file (most ftp-programs don't show hidden files by default, so don't start uploading it without checking your server). If you do, download that old one first, and copy the contents of the new .htaccess file (from the fancyurls folder) in your old one, and upload that... 2. Edit this file so that $CONF['Self'] points to your main directory. NOTE: this time, and only this time, the URL should NOT end in a slash 3. Also edit the $CONF['Self'] variable in your index.php, if you don't want to end up with index.php/item/1234 urls when people come via that way 4. Enable 'Fancy URLs' in the Nucleus admin area (nucleus management / edit settings) 5. Off you go! If it doesn't work: ------------------- Remove the files again (don't forget the hidden file .htaccess). Voila. */ // remember: this URL should _NOT_ end with a slash. $CONF['Self'] = 'http://www.momoso-net.com/~ms08'; ?>
2005-06-01: Nucleusのnucleus_memberテーブルをベーシック認証で使う
Nucleusのメンバー管理テーブル「nucleus_member」をそのままベーシック認証のデータベースとして利用してしまう。
これができれば、メンバーのみがアクセスできる領域のベーシック認証管理を
Nucleusのメンバー管理で行えるわけです。
内容は簡単です。メンバー専用のフォルダをホームページに作成し
その中に「.htaccess」を作成するだけです。
続きで必要なものと方法を紹介します。
GENTOO Linux なのでそれらしく説明します。
環境(バージョンとUSE=の値)
OS:もちろん GENTOO Linux カーネルはまだ2.4です。
apache-2.0.54-r4 +berkdb -debug -doc +gdbm +ipv6 +ldap +ssl -static -threads
mysql-4.0.24 +berkdb -debug +innodb +perl +readline (-selinux) +ssl -static +tcpd
Neucleus Ver 3.2
1. mod-auth-mysqlのインストール
MySQLをベーシック認証に使うにはこれが必要
[ebuild N ] net-www/mod_auth_mysql-2.0.0_pre20030510 +apache2 0 kB
emerge mod_auth_mysql
注)net-www/mod_auth_mysql-3.0.0にバージョンアップするとAuthMySQLMD5Passwordsなどのパスワード暗号化がうまく動きませんでした。とりあえずmod_auth_mysql-3.0.0はマスクしてバージョンアップしない。(調査中 05-11-15)
バージョンがmod_auth_mysql-3.0.0の場合はAuthMySQLMD5Passwordsではなく、AuthMySQLPwEncryptionを書くようです。
2. apache2の起動オプションの変更
/etc/conf.d/apache2へAUTH_MYSQLを追加
APACHE2_OPTS="-D SSL -D PHP4 -D DOC -D AUTH_MYSQL"
apache2を再起動しましょう。
3. メンバー専用フォルダ/.htaccessの作成
AuthName "MEMBERS LOGIN"
AuthType Basic
AuthMySQLHost localhost
AuthMySQLUser xxxxx <- NucleusをインストールしたときのDBユーザ名
AuthMySQLPassword xxxxxxxxxxxx <- 上記のパスワード
AuthMySQLDB xxxxx <- NucleusをインストールしたときのDB名
バージョン2.0.0_pre20030510の場合
AuthMySQLMD5Passwords On <- 暗号化パスワードMD5を設定これでないとだめでした。
ここまで
バージョン3.0.0の場合
AuthMySQLPwEncryption md5 <- none,crypt,scrambled,md5,sha1から選べます。
AuthMySQLEnable On
ここまで
AuthMySQLUserTable nucleus_member <- メンバーテーブル
AuthMySQLNameField mname <- メンバーテーブルのIDフィールド
AuthMySQLPasswordField mpassword <- メンバーテーブルのパスワードフィールド
require valid-user
こんな感じ!
グループ制御も加えるとおもしろいかもしれません。
Category: BLOG/Nucleus 1 Trackback