I was trying laravel PHP framework and setup a laravel.dev
domain for testing.
Here are the high level steps on how I did it.
- add domain in host file
- enable virtual host in XAMPP
- add virtual host in XAMPP
Environment
1. Add domain in host file
We can manually locate the host file and add the domain. But using Gas mask is a lot easier and it simply works!
- download gas mask
- install gas mask
- open gas mask
- create new local host file (I used ‘dev’)
-
add the development domain you like to use
127.0.0.1 laravel.dev
-
save
- create new combined host file
- add rignial File
- also add dev (new created) local host file
- save
- activate
2. Enable virtual host in XAMPP
- goto
/Applications/XAMPP/xamppfiles/etc/
- open httpd.conf
-
find the following and remove #
#Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf
-
save
3. Add virtual host in XAMPP
- goto
/Applications/XAMPP/xamppfiles/etc/extra/
- edit httpd-vhosts.conf
-
uncomment the existing vhosts except
NameVirtualHost *:80
-
add the following
<VirtualHost *:80> ServerName localhost DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs" </VirtualHost> <VirtualHost *:80> DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/laravel/public" ServerName laravel.dev <Directory "/Applications/XAMPP/xamppfiles/htdocs/laravel/public"> Order allow,deny Allow from all </Directory> </VirtualHost>
-
save
- restart Apache
Test
- open browser of your choice
-
visit
http://laravel.dev/
-
see the beautiful larval welcome page
More
Readings
- Even’s How to set up dynamic virtual hosts for web development
- Remy Sharp’s How to setup your Mac web development environment
- Dayle Rees’s Laravel: Getting Started
- Jack Wallen’s Weekend Project: Create Virtual Hosts with Apache @ Linux.com
- Sprugman’s answer @ StackOverflow.com
- Sawyer McFarland Media, Inc’s Setting Up Virtual Hosts for XAMPP
- Installation & Setup – Laravel documentation
Z wykorzystaniem wystawy medialnej, zielonych ziaren kawy apendyksów
ubytek veight Ekstrakt pozyskała tkliwe powitanie pośród konsumentów, jacy zmagają
się z nadwagą. Gdy wiadomo, nadwyżka masy ciała przewodzi
aż do długiej listy chorób zagrażających mieszkaniu, wskutek tego grunt istnieje, żeby znajdować się