Mac:SierraでPHPのコーディングをしたいためapacheを設定しているのですがブラウザから
localhost/~username/phpinfo.php
へアクセスすると下記エラーとなります。
Forbidden
You don't have permission to access /~username/phpinfo.php on this server.
数日ネットで調べ回りましたがどうしても原因がわからないため投稿しました。
何が原因かおしえていただけないでしょうか?
apacheの設定は下記URLを参考にして設定しています。(ユーザ名は伏字でusernameにしています)
http://qiita.com/mazgi/items/42458878e75bf1abc1c4
http://qiita.com/hiyoko_40/items/4505e3981de3e46914cb
○ /etc/apache2/httpd.conf の変更
apache
1167 LoadModule userdir_module libexec/apache2/mod_userdir.so 2170 LoadModule php5_module libexec/apache2/libphp5.so 3504 Include /private/etc/apache2/extra/httpd-userdir.conf 4
○ /etc/apache2/extra/httpd-userdir.conf の内容
apache
1UserDir enabled 2UserDir Sites 3Include /private/etc/apache2/users/*.conf 4<IfModule bonjour_module> 5 RegisterUserSite customized-users 6</IfModule>
○ /etc/apache2/users/username.conf の内容
apache
1<Directory "/Users/username/Sites/eccube/test/htdocs/"> 2 Options +Indexes +MultiViews +FollowSymLinks +SymLinksIfOwnerMatch +ExecCGI 3 AllowOverride All 4 Require local 5 Order allow,deny 6 Allow from all 7 Require all granted 8</Directory>
○ /Users/username/Sites/eccube/test/htdocs/phpinfo.php(パーミッション777,所有者:username,グループ:staff)
PHP
1<?php 2phpinfo(); 3?>
○ ls -ld /Users/username/ の結果
drwxr-xr-x+ 31 username staff 1054 8 20 12:20 /Users/username/
回答1件
あなたの回答
tips
プレビュー