How to create VirtualHost in Linux Ubuntu 10.04 Lucid Lynx

Published by Igor Khrupin on

The procedure of creation VirtualHost in Linux is very simple.
I try to make it more simple for me. The result of this work is .sh script that you can download below. Just untar this archive

tar xvf vhosts.sh.tar.gz

and run this script in terminal with sudo.
Example of usage:

IP = 127.0.0.1
ServerName = example.com
ServerAdmin email = webmaster@example.com
Your username in System = user
htdocs directory path = /home/user/htdocs/

If we located in same directory that vhosts.sh script command in terminal will be:

sudo ./vhosts.sh 127.0.0.1 example.com webmaster@example.com user /home/user/htdocs/

Now open your browser and type the adress http://example.com .If allright you will see phpinfo();
hope it’s will be useful for you.

For more tutorial information look in script file.

Download it from github

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.