Create Virtual Hosts in LAMPP

virtualhost

Berikut langkahnya:

1. Ketikkan di terminal :

sudo gedit /opt/lampp/etc/extra/httpd-vhosts.conf

duplikat contoh script virtual host yang ada dan sesuaikan :

< VirtualHost *:80 >
ServerAdmin webmaster@cmsuin.edu
DocumentRoot "/opt/lampp/htdocs/cmsuin"
ServerName cmsuin.edu
ServerAlias www.cmsuin.edu
ErrorLog "logs/cmsuin.edu-error_log"
CustomLog "logs/cmsuin.edu-access_log" common
< / VirtualHost >


2. Ketikkan di terminal :

sudo gedit /opt/lampp/etc/httpd.conf

Bagian bawah sendiri tambahkan baris:

Include etc/extra/httpd-vhosts.conf

3. Ketikkan di terminal :

sudo gedit /etc/hosts

Tambahkan baris:

127.0.0.1 cmsuin.edu

4. Ketikkan di terminal :

sudo /opt/lampp/lampp reload

5. Silahkan coba di browser: cmsuin.edu

And now it works !

Sumber:
http://www.devarticles.in/linux/creating-new-virtual-host-while-using-xampp-in-ubuntu-linux/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s