Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XAMPP localhost returns object not found after installing Laravel

After much faffing about I got laravel to work with XAMPP. However, I can't seem to access directories in the htdocs folder via localhost now. Attempt to access a file returns Object not found! along with The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

The changes I made to get laravel working seems like a blur now. The only thing I remember doing is editing the hosts file to enable the virtual host to work by adding 127.0.0.1 laravel.dev in the hosts file (using a mac btw). I also added a virtual host to the httpd-vhost.conf file.

I did undo the above changes but it didn't make a difference.

Any thoughts on whats gone wrong?

Thanks.

Dispelling Confusion Just thought I'd clarify what my experience is. Before installing laravel 4 I could access all my projects with localhost/someProjectName but now it fails.

I'm trying to identify what change caused this behaviour. Btw, I have no problems accessing my laravel project (my mapping allows me access to it via laravel.dev)

like image 498
kaizenCoder Avatar asked Jun 16 '13 02:06

kaizenCoder


1 Answers

Look into your /etc/httpd.conf file and see if you have Virtual hosts activated.

If so, check your etc/extra/httpd-vhosts.conf file. You might have set up a VirtualHost already.

EDIT: I have found that once you turn on Virtual Hosts, XAMPP needs a default VirtualHost for your basic htdocs files

Try adding a default VirtualHost (at the bottom of the file) like so:

<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Applications/XAMPP/htdocs"
<Directory "/Applications/XAMPP/htdocs">
Options Indexes FollowSymLinks Includes execCGI
AllowOverride All
Order Allow,Deny
Allow From All
</Directory>
</VirtualHost>
like image 57
jon_athan_hall Avatar answered Oct 13 '22 18:10

jon_athan_hall