Many developers start development in their local environment and then go to a staging environment when the work is done. In many instances, the local environment has minimal resources required for the development. Most of the beginners Laravel developers use php artisan serve to serve site but some developers like to create a website in a localized environment. If you are working with Laravel, setting up virtual hosts and free XAMPP/WAMP stack is a straightforward task. XAMPP/WAMP stack ensures that when the time comes to take the project live, the database(s) could be moved easily without any hassle. In this tutorial, I am going to demonstrate how you can set up and configure virtual hosts for Laravel websites with XAMPP running on Windows 10.
Step 1: Open host file from C:\WINDOWS\system32\drivers\etc\ and add following :
Step 2: Open xampp\apache\conf\extra\httpd-vhosts.conf and add following line:
Step 3:Restart XAMPP and now run in your browser :
laravel.local
You can see that the domain has been added successfully. You are now free to run the application of your choice in the virtual host. In my case, I will opt for Laravel. That’s it! I hope you have a clear idea of setting up Virtual Hosts for Laravel with XAMPP running on Windows 10. If you have any queries or suggestions, feel free to ask me via the comment section below.Create the Virtual Host in Windows10
TL;DR
127.0.0.1 localhost
127.0.0.1 laravel.local
In the above code :
Note: You may need administrator access to edit the file
127.0.0.1 localhost
127.0.0.1 laravel.local
Final Words
Ads 970x90
बुधवार, 20 मई 2020
How to configure Virtual Host on XAMPP on Windows 10
Related Posts
Load comments
सदस्यता लें
टिप्पणियाँ भेजें (Atom)






