現在PHPを学んでいます。
そのためにXAMPPを使用しています。
htdocsフォルダの中にstudy.localhostというフォルダを作成し、
ドキュメントルートとhostsの設定をしました。
〜ドキュメントルートの設定〜
<VirtualHost *:80>
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/study.localhost"
ServerName study.localhost
DirectoryIndex index.php index.html
</VirtualHost> 〜hostの設定〜 127.0.0.1 study.localhost<Directory "/Applications/XAMPP/xamppfiles/htdocs/study.localhost"> AllowOverride All Allow from All </Directory>
上記を記述し、XAMPPのApacheを起動した際、
http://study.localhostというURLで正常に/Applications/XAMPP/xamppfiles/htdocs/study.localhost配下のindex.phpファイルが表示されました。
そして今回、
ミニブログを作成することになりまして、
htdocs配下にmini-blog.localhostというフォルダを作成し、
さらにその配下にwebというフォルダを作成し、そのwebというフォルダに主にデスクトップに表示する内容を保存することになりました。
そのため、
再度ドキュメントルート等を再設定することになりました。
そこで、
・mini-blog.localhostを直接ドキュメントルートにせず、
mini-blog.localhostのwebフォルダをドキュメントルートに設定すること。
・webフォルダに対して、「http://mini-blog.localhost」というドメインでアクセ スできるようにすること。
となりました。
なので、
〜ドキュメントルートの設定〜
<VirtualHost *:80>
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/mini-blog.localhost/web"
ServerName mini-blog.localhost
DirectoryIndex index.php index.html
</VirtualHost><Directory "/Applications/XAMPP/xamppfiles/htdocs/mini-blog.localhost/web"> AllowOverride All Allow from All </Directory>
〜hostの設定〜
127.0.0.1 mini-blog.localhost
と修正しApacheを起動しましたら、
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at you@example.com to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
というエラーが発生していまして、
error.logをみたところ、
AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
このようなエラーが発生しました。
どこを修正すれば、
・mini-blog.localhostを直接ドキュメントルートにせず、
mini-blog.localhostのwebフォルダをドキュメントルートに設定し、
かつ
・webフォルダに対して、「http://mini-blog.localhost」というドメインでアクセ スできるようになるのでしょうか??
教えて下さい。
よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/11/26 02:06
2015/11/26 03:04