tisuchi
December 2017
M T W T F S S
« Nov    
 123
45678910
11121314151617
18192021222324
25262728293031

Categories


How to Configure Virtual Hosts in XAMPP on Mac

tisuchitisuchi

If you have a plan to do virtual host in localhost on Mac via Xampp, I think this post will help you that how to configure virtual hosts in xampp on mac.

Enable VirtualHosts

The first thing you’ll need to do is open the file /Applications/XAMPP/xamppfiles/etc/httpd.conf . Look for the following lines:

 # Virtual hosts
 #Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf

Uncomment the second line by removing the hash (#), so that Apache loads your custom VirtualHosts configuration file:

# Virtual hosts
Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf

Create your VirtualHosts

Open the file /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf. Bottom of this file, add like follows-

Finally Edit your hosts file

Once you’ve saved your httpd.conf and httpd-vhosts.conf files, the next step is to edit your OS X hosts file so it knows how to handle your new ServerName.

Open Terminal and run-

sudo nano/etc/

and add your own mapping:

# XAMPP VirtualHost mappings
127.0.0.1 mysite.dev

Save the host file using the key combo control+o, and pressing return when prompted to choose the filename. Close the file using control+x.

Enjoy.

<p>I speak PHP, Laravel, MySql, JavaScript, VueJS, Python, Bengali and English. I am originated from Bangladesh, currently working in Malaysia. My day time job is to develop web apps for EDV Standard, and night time, I solve coding issues for communities.</p>

Comments 0
There are currently no comments.