3日目とか書きながら期間が空いてしまいましたが、先程まで悩んでいたため更新できませんでした。
CentOS4/CentOS5 - Apache2 - ユーザ毎のディレクトリを公開する
こちらを参考にユーザー別に作ったディレクトリにcakephpを公開したいので設定をする。
vim /etc/httpd/conf/httpd.conf
367行目
UserDir disabled
↓
#UserDir disabled
374行目
#UserDir public_html
↓
UserDir public_html
382 <Directory /home/*/public_html>の箇所らへんを
<Directory /home/*/public_html>
Options IncludesNoExec ExecCGI FollowSymLinks
AllowOverride All
</Directory>
に修正。
/home/~ユーザーネーム/sample/の場所にcakephpを設置した場合
sampleディレクトリの.htaccess
vi .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /~ユーザーネーム/sample
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
sampleディレクトリ/appの.htaccess
vi app/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /~ユーザー名/sample/app
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
sampleディレクトリ/app/webrootの.htaccess
vi app/webroot/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~ユーザー名/sample/app/webroot
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
赤の部分を追加する。
tempのパーミッションの変更
suしてから、
chmod -R 777 app/tmp
で変更。
取りあえず動いた(;;)

