Skip to content

Instantly share code, notes, and snippets.

View sibysathyanesan's full-sized avatar

Siby Sathyanesan sibysathyanesan

View GitHub Profile
@sibysathyanesan
sibysathyanesan / xampp-virtualhost.md
Created June 10, 2019 11:09 — forked from ibrahimtuzlak0295/xampp-virtualhost.md
Create virtual host in XAMPP, Ubuntu 16.04

I’ll go step-by-step on how to create a virtual host in the XAMPP environment. As we know, the default http://localhost points to /opt/lampp/htdocs as the root directory. The desired result is to be able to visit http://examplevhost.local, with the root directory being /opt/lampp/htdocs/examplevhost.

Note: The steps below are done on Ubuntu 16.04, but they should also work on most other Linux distribution

Note: I’ll assume that XAMPP is installed in /opt/lampp. If it’s different on your setup, please read carefully adjust accordingly

Enable virtual hosts in apache configuration file

Note: This should be done only once per XAMPP installation. If you want to add another virtual host later you can skip to the next step