I am new to laravel, and I have installed a fresh copy of laravel. My project root directory is located in E:/xampp/htdocs/myapp
and I want this to load on myapp.com in browser how exactly to do this ? I am using laravel 5.2 and xampp for my project.
Asked
Active
Viewed 218 times
2

John Deep
- 45
- 2
- 6
-
read about virtual host – Iftikhar uddin Jun 17 '16 at 10:47
-
Possible duplicate of [How to change the URL from "localhost" to something else, on a local system using wampserver?](http://stackoverflow.com/questions/17652373/how-to-change-the-url-from-localhost-to-something-else-on-a-local-system-usin) – Gino Pane Jun 17 '16 at 10:49
-
It is not question about Laravel, it is about setting up domain names on local machine. – Gino Pane Jun 17 '16 at 10:50
2 Answers
3
It is possible with enabling virtual host on your xampp settings. First of all you need to visit E:\xampp\apache\conf\extra\https-vhosts.conf
and make some edits. Edit httpd-vhosts.conf file in your favorite editor and add the below code at end of the httpd-vhosts.conf file.
<VirtualHost *:80>
DocumentRoot "E:/xampp/htdocs/yourprojectfolder/public"
ServerName yourdesirename.com
</VirtualHost>
After this you need open notepad as administrator and edit hosts file
(C:\Windows\System32\drivers\etc\hosts)
Note : If hosts file is not showing in the target directory you need to change the select box to 'Show All Files'
and add 127.0.0.1 localhost yourdesirename.com
at the end of hosts file, once done now open your browser and type yourdesirename.com
and your project will dance live there.

Iftikhar uddin
- 3,117
- 3
- 29
- 48