I tried http://localhost/testproject/public/users and I receive a 404 error not found
I added Route::get('users', function() { return 'users!'; }); in the htdocs/testproject/app/routes.php file
I changed the route to Route::get('/users', function() { echo "users!"; });
with the same results
Use command prompt or terminal, go to project root, type "php artisan serve" and it should be accessible on localhost:8000
Did you go to /app/users or /public/users?
I tried boh localhost/testproject/public/users and localhost/testproject/app/users with the same result.
I went to htdocs/testproject in cmd prompt and entered "php artisan serve" I then went to firefox and tried the following addresses with the same results
localhost/testproject/public/users
localhost/testproject/app/users
localhost/testproject/public/users:8000
localhost/testproject/app/users:8000
public:8000
public/users:8000
app/users:8000
I am already running Apache on OpenSUSE 13.1 and If i go to localhost/testproject/public I get the You have Arrived message
If you get the You have arrived page, it means it's working
Try localhost:8000/users or localhost/testproject/public/users. Or type php artisan routes to see it the /users page was registered
localhost:8000/users worked
But If You have arrived appears when I am using Apache2 what do I need to do to get it working there. I dont want to run two seperate web servers and is artisan production ready? I thought it was mostly for testing
localhost/testproject/public/index.php/users works
http://stackoverflow.com/questions/16897504/laravel-quick-start-guide-route-not-working
I have everything working on OpenSuse 13.1, with Apache2. Now when i enter localhost/test/users it works. Below are the changes I needed to make in Apache2 configuration. Hope this helps someone else.
testproject is the directory I created to test Laravel
I needed to add the following lines to httpd.conf
Alias /test "/srv/www/htdocs/testproject/public"
<Directory "/srv/www/htdocs/testproject/public">
DirectoryIndex index.php
AcceptPathInfo on
Options Indexes FollowSymLinks Multiviews
AllowOverride All
Order allow,deny
Allow from all
</Directory
I also added the following line to .htaccess in /srv/www/htdocs/testproject/public
RewriteBase /test
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community