After laravel installation localhost doesn't work
So from the chat we had in the comments we came to the following conclusions:
- You're using a linux(ubuntu) server.
- You're using
lamp
, more information about lamp can be found here - You're trying to run
lamp
(localhost) andlaravel
(localhost:8000) together.
With this information i think the issue is within the laravel and localhost application combined. There are a couple of things we should keep in mind
- To run
laravel
on a localhost:8000 environment be sure to run the following commandphp artisan serve
. - The configuration as told in older answers should be set right in
laravel
- Give 775 permission to storage & bootstrap folder inside laravel folder and access url through html/laravel/public. *credits to: @vijay_Kashyap
- Check the .conf file of apache and make sure all items are set right.
- Look for the file:
000-default.conf
-> tutorial
- Look for the file:
Even if all these things are set correctly the mistake could still appear due to wrong url-rewriting
or the server that clashes with the laravel
installation.
If you're sure that the above settings are set correctly you should take a look at the configuration of your lamp
installation and the setup steps of laravel
. Think about some of the following things:
- Are the right packages installed
- Is everything up to date -> command:
sudo apt-get upgrade
,sudo apt-get update
(use-dist
in case you're not completely sure). - Is Apache's mod rewrite enabled? ->
sudo a2enmod rewrite
- Did you install
composer
->curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer - check
my_app.conf
(if exists in your case).
If none of these things work for you it maybe would be an idea to restart from the beginning. Maybe you've made some changes to files you didn't need to change but forgot about them due to frustration etc. (happend to me the first time i installed multiple application types).
I would also like to refer you to laracasts and this tutorial about lamp
Since i'm not able to review the server for myself i can't give you much more information at the moment. Do ask questions if anything is unclear or new errors occur.
Hope this helps!
Laravel 4 not working
Try
localhost/yourfolder/public
Run laravel project in localhost
Try to run in different port
php artisan serve --port=9000
and then try http://127.0.0.1:9000 will work.
As might be on port 8000 something already running on your system will not make it work.
And you can also run your laravel
project without artisan serve command
If anyone wants to make the application public, the more easy and fastest way is:
- Rename the "server.php" file in root directory, in "index.php"
- Move your .htaccess from public folder to root directory
- Make your directory accessible to Apache2 (set all file permissions
to 777).
laravel app won't appear on localhost
First things, make sure both Apache and MySQL are running.
Move to the root project directory, fmvcei in your case, then run this command php artisan serve
. you can browse by 127.0.0.1:8000
NB. you need to install composer if you don't yet.
Laravel route throwing: cannot find localhost
Try using
HTML::link_to_action('articles@write', 'New article');
and set up your root URL right in the application/config/app.php
to http://localhost
or http://127.0.0.1
!
Related Topics
MySQL Alter Table Add Field Before or After a Field Already Present
PHP How to Get the Base Domain/Url
PHP Find All Occurrences of a Substring in a String
Execute a PHP Script from Another PHP Script
How to Use Two Submit Buttons, and Differentiate Between Which One Was Used to Submit the Form
Simple Comet Example Using PHP and Jquery
Codeigniter - Correct Way to Link to Another Page in a View
Codeigniter Assets Folder Best Practice
How to Use PHP in a JavaScript Function
Twilio PHP - Ssl Certificate: Self Signed Certificate in Certificate Chain
Change Name of Laravel's Created_At and Updated_At
How to Install an Older Version of PHPunit Through Pear
Php: Get List of All Filenames Contained Within My Images Directory
How to Access a Different Controller from Inside a Controller Symfony2
Laravel Quick Start Guide Route Not Working