Reputation: 45
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.
Upvotes: 2
Views: 229
Reputation: 3192
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.
Upvotes: 3