How to create a virtual host for Laravel Project, some developers feel very boring of word "localhost", so they want to change something new so the virtual host can help to change the "localhost" to another name that can make sense to their project. So we dive into now:
Here is example below:
1. You have to navigate to folder etc in Drive:C: like this: C:\Windows\System32\drivers\etc and open the host file with an editor like notepad. For me, I added 127.0.0.1 cmsuser.dev in the bottom and save file.
2. You have to go to your localhost like C:\xampp\apache\conf\extra and find the file httpd-vhosts.conf and then open it and add some code like below:
Note : You have pointed out the url to the project your localhost!
3. Restart server and open the browser and type cmsuser.dev. You will see your project is running but one more important things is: if you had changed your port so you have put the port number at server name like cmsuser.dev:1010
Here is example below:
1. You have to navigate to folder etc in Drive:C: like this: C:\Windows\System32\drivers\etc and open the host file with an editor like notepad. For me, I added 127.0.0.1 cmsuser.dev in the bottom and save file.
2. You have to go to your localhost like C:\xampp\apache\conf\extra and find the file httpd-vhosts.conf and then open it and add some code like below:
Note : You have pointed out the url to the project your localhost!
No comments:
Post a Comment