Issue
On Fedora 20 I created a folder named test
then installed Laravel via composer create-project laravel/laravel
into it. It ran successfully and now I try to view it in FireFox in the following URL:
http://localhost/~username/test/laravel/public/
But it throws the following error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at root@localhost 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.
If I go to the parent folder, I can see that everything is there except the public
folder. However if I ls
in the terminal I can see that the folder is right over there. There is no problem with other PHP scripts only with this project. I tried to play with folder permission but no success. Why can't I see the folder in the browser and why does it throws an Error 500 when I try to access it?
Solution
Debugging
After I looked at /var/log/httpd/error_log
I saw the following in the last line:
[Tue May 20 09:37:21.874443 2014] [core:alert] [pid 2897] [client ::1:55498]
/home/username/public_html/test/laravel/public/.htaccess
:
Options not allowed here, referer:http://localhost/~username/test/
Make things work
So in my public
folder I renamed the .htaccess
file to .htaccess2
and now it works. Of course now I need to write index.php
after public/
in the URL but at least it works. This also solved the invisible folder error, so if I go to the project root (the parent folder of public
) in the browser it lists the public
folder too.
Try to fix it
According to this answer configurations in the httpd.conf
file can be overwritten by other extra files. You should search these files for a line containing AllowOverride
like AllowOverride AuthConfig FileInfo
and replace it with AllowOverride All
.
Answered By - totymedli Answer Checked By - Robin (WPSolving Admin)