There are Two Changes is to done to CreateVirtual Host for Laravel Project on Xappp in Windows 10. Just Follow the below Steps :-
After XAMMP is downloaded next thing to do would be to set up a virtual host on XAMPP. On the internet virtual host is the provision of Web server hosting so that a company doesn’t have to purchase and maintain its own Web server and connection to Internet. It is just another name for shared hosting. There are Two Changes is to done to Create Virtual Host for Laravel Project on Xappp in Windows 10. Just Follow the below Steps:- Step 1:-Go to xampp apache conf extra and open httpd-vhosts.conf file. See the Below Image.
Step 1 :- Go to xamppapacheconfextra and open httpd-vhosts.conf file. See the Below Image :-
Step 2 :- Just Copy and Paste the Below Code but and write your project directory url and remember that, if your Laravel Project is Running on public folder then use public after your project name in DocumentRoot.
Step 3 :- Now, go to C:WindowsSystem32driversetc and open hosts file. See the Below Image :-
Step 4 :- Now Open and edit hosts file and write your url of project where mine, as seen in below image :- Eastern time right now.
- How to use Bluestacks as emulator in Android studio. - March 18, 2021
- How to upload new keystore or app signing key in Google play console after lost or forget Keystore. - March 18, 2021
- [SOLVED] ErrorException preg_match(): No ending delimiter ‘/’ found - December 29, 2020
virtual host for a Laravel in Xampp?
Developers, need to create virtual hosts in xampp to run multiple projects because that is much easier than accesing the direct path of localhost URL. Creating a virtual host in xampp is very easy, however you may need to configure it correctly for a Laravel project and today we are going to share with you how to do it very easily.
1. Creating a local URL for your laravel app
In this post we want to access our laravel project from the browser accesing the URL //laravel.localhost.com, so you need to modify the hosts file of Windows located in
Remember to edit the hosts file using an editor with administrator rights, otherwise you will not be able to save the changes. you can copy host file at desktop and make changes then again copy changed/repalce existing host file into etc folder. Then add the host using a custom host on your system, in this case we will add the
127.0.0.2 host that will be accesible as well with an alias of
You can increase the final number of the host to have multiple of them e.g 127.0.0.3, 127.0.0.4 etc for multple projects.
2. Creating a Virtual Host
The main entry point of a laravel application is the index.php located inside the public folder, so the main directory for our application will be the absolute path to your project in the public folder as shown in the following example. The virtual host should be point out the same host declared in the hosts file of windows (in this case
127.0.0.2) at the port 80. You can create this virtual host appending the following snippet at the end of the content of the
httpd-vhosts.conf file located in the xampp folder
Xampp Virtual Host Laravel Login
Finally, by visiting either //laravel.localhost.com or 127.0.0.2 in your browser will show the entry point of your Laravel application: