How to make a virtual host site?

Step 1: In hosts file , add one line 127.0.0.1 myreview.gne

$ sudo vi /etc/hosts

Add line:

127.0.0.1 myreview.gne

Step 2: Copy “default” file in /etc/apache2/sites-available with the new file named myreview.gne

In myreview.gne file ,make changes in path like /home/priyanka/myreview/myreview/www

Step 3: Make a symbolic link of this file in sites-available to sites-enabled by:

sudo ln -l /etc/apache2/sites-available /etc/apache2/sites-enabled

or

apply following command:

sudo a2ensites myreview.gne

(To remove the file created by a2ensites, apply sudo a2dissite myreview.gne)

 

Advertisements

About Priyanka Kapoor

Simple, Hardworking & friendly.....
This entry was posted in Uncategorized. Bookmark the permalink.

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