September 1, 2011

Steps to Hosting a Web Site on Ubuntu 11.04

1. install apache2 the go to /etc/apache2

2. cd sites-available

3. cp default  new_web_site_name_file

4. make the changes as follows this is for Name virtual hosting

NameVirtualHost IP  e.g.x.x.x.x
// this would already be there just change *

ServetrAdmin your mail id //this entry would also be there just change mail id

add the following three entries according to your need

 DocumentRoot /var/www/Your dir name/ // web site's root path
 DirectoryIndex login.php //default login page entry
 ServerName your web site //ur web site address

let other entries be there

save the file.


run the following commands as root user or use sudo

a2ensite name  new_web_site_name_file (file name used in step 3)

the restart the apache web server

/etc/init.d/apache2 restart/reload

you can acces the web site aftre making the necessary cahnges in the /etc/hosts file on your system or acess it on the interanet/internet after getting its entry done in the DNS



Harkamal Dadwal






Click Here!