Wednesday, July 22, 2009

Virtualhost

Firstly we create virtual host in ubuntu.
You follow the following step;

1. open the terminal and go to root( for that enter sudo -i).

2. Then go to the hosts file in your machine. For that enter the following command.
gedit /etc/hosts.
then enter the following line in hosts file.
127.0.0.1 example.loc

3.then go to the your site-available folder.
Enter the following command in terminal.
cd /etc/apache2/sites-available

Then enter open the default file and copy the lines.
then enter the following command and paste following lines it.

gedit example.loc
paste code:

then edit the lines according following lines.

ServerAdmin webmaster@localhost
ServerName prestashop.loc
DocumentRoot /var/www/prestashop


4. Then enter the following command in your machine.
ln -s /etc/apache2/sites-available/example example.loc
5. Then create the example folder in your www folder.

6. Then restart the your apache server.
/etc/init.d/apache2 restart

7. open the your Browser and enter http://example.loc

Good luck :)

No comments:

Post a Comment