ari ari
ari ari

Reputation: 165

How to run multi Laravel projects on XAMPP or Wamp

I have one laravel project in Xampp and I set my localhost to localhost/laravel/public

and now I want to start another laravel project and now I dont know what should I do. I created a laravel project in another folder named : blog

but laravel router doesnt work anyway

Upvotes: 0

Views: 3568

Answers (2)

Arun Code
Arun Code

Reputation: 1638

I assume that you are not in the production environment, and trying locally to develop. In this case, you can run the built-in laravel php server using the artisan command.

Normal usage.

//run this command inside your folder, in this case inside blog folder.

php artisan serv

This will start the server on localhost:8000. However, the above command also accept a parameter called port. Run the above command in other laravel project folder with a different port.

php artisan serv --port=9000

Which will run the server in 9000 port and can be tested using localhost:9000.

If you are using for production purpose, try apache virtual host or nginx virtual host based on your server.

Upvotes: 0

pubudeux
pubudeux

Reputation: 178

You need to use virtual hosts (if you're using Apache) to map different hostnames to different directories on the same server.

https://httpd.apache.org/docs/current/vhosts/examples.html

If you're using Nginx, you would use "server blocks"

Upvotes: 2

Related Questions