I have created a laravel 5.0 project with php artisan serve, now i need to know how to run laravel 5.0 project run without start php artisan serve, i have already browse lot of websites no one help me..
-
Please let us know what is your operating system – Khan Shahrukh Jun 25 '15 at 11:39
-
Follow this guideline and you can create unlimited laravel project on XAMPP http://stackoverflow.com/questions/27754367/how-do-i-set-up-my-apache-virtualhost-settings-with-xampp-on-windows/27754990#27754990 – Maytham Fahmi Jun 26 '15 at 19:30
7 Answers
You need to change "server.php" to "index.php" then copy ".htaccess" from public to root directory.

- 1
- 1

- 526
- 13
- 29
-
-
this works but it does not load the css filles. Does not load the public folder – CAllen Oct 24 '17 at 01:15
Laravel sever Folder is "public". There is an index.php so you can run you project from there.
Suppose if you using UbuntuOS then you have to create your local server in public directory. Suppose your folder name is laravel_test then go in that directory and run some thing like this
php -S localhost:8000 -t public
If you using windows then access public folder from URL.
localhost/laravel/public
Actually it's bad practise to access folder from URL but for local its good. You also can go with host entry. Just make sure that your target folder is "public" directory.

- 1,401
- 14
- 19
Normally you would have WAMP/XAMPP installed. You can access Laravel project like below
localhost/laravel/public
But this is not recommended. You should create Virtual host for example
laravel.local
that pints to server-root/laravel/public
.
this is how you create virtual host.
Or even better go for a Laravel Homestead .

- 10,240
- 5
- 49
- 62
- Use http://localhost/projectName/public
It will be work. but in case if you have another Route and you can not access that Route and get the error like " Page Not Found " then please use the following command
sudo a2enmod rewrite
Now open the http://localhost/projectName/public/yourRoute

- 2,232
- 22
- 21
This is a little late but still applicable, what I like to do (using ubuntu 14.x+) is put my laravel project (let's say Project1
) in my var directory, so it would be in /var/Project1
, then symlink the public folder to somewhere in /var/www
(+/html
depending on apache version).
Symlink can be done something like this:
ln -s /var/Project1/public /var/www/html
This keeps your internal files off the grid so to speak, this is untested so if I've missed anything just comment and I will amend this post.
EDIT:
Obviously if your http root is /var/www/html
you can put your project in /var/www/Project1

- 1
- 1

- 1,490
- 1
- 14
- 29
If you have access to xampp or wampp on your operating system you can more or less configure your virtual host like in the instruction below:
https://bestin-it.com/creating-virtualhost-on-your-local-computer-to-start-simple-index-php/
This instruction shows how to run it locally on your PC, but it works generally the same on any hosting portals. In most case in payed portals you have any web panels to configure your public folder that reference to /public folder in laravel folder's structure.

- 141
- 7