Linux.com

Home Linux Community Community Blogs Personal Steps to Hosting a Web Site on Ubuntu 11.04

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 address.com //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

 

Regards

Harkamal Dadwal

 

 

 

 

 

 

Comments

Subscribe to Comments Feed

Upcoming Linux Foundation Courses

  1. LFD331 Developing Linux Device Drivers
    13 Oct » 17 Oct - Virtual
    Details
  2. LFS425 Linux Performance Tuning Crash Course
    16 Oct » 16 Oct - DĂĽsseldorf, Germany
    Details
  3. LFS220 Linux System Administration
    20 Oct » 23 Oct - Virtual
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board