Add Websites To Web Server Adding Virtual Hosts Domain Names Apache Server
add websites to web server adding virtual hosts domain names apache server
add, websites, to, web, server, adding, virtual, hosts, domain, names, apache, server
Add Websites To Web Server Adding Virtual Hosts Domain Names Apache Server
Post Description: add websites to web server adding virtual hosts domain names apache server
POST# 130
Posted On: Fri Feb 29, 2008 12:01 pm
web hosting
Topic: Add Websites To Web Server Adding Virtual Hosts Domain Names Apache Server
if you want to add a domain name to your server and want to have its directory so it doesn't show the defaul apache page, well you can. its called virtual server.



this is the example i will be working with.

  • i have a fedora core linux web server with apache and bind9

  • I have domain name called wallpaperama.com

  • all my files are going to be in the /var/www/sites/wallpaperama/ directory

  • My email address is myemail@example.com

  • My linux server ip address is: 70.238.57.57

  • i have access to root

  • i have access to linux shell (via ssh)




I have domain name called wallpaperama.com and all my files are going to be in the /var/www/sites/wallpaperama/ directory so this is how i would do it.


STEP 1. we need to add our virtual host to a file called httpd.conf so send this command to edit:

nano /etc/httpd/conf/httpd.conf


now go to the bottom of the page, and add the following at the last line of the file:

######################################
# Vhost: www.wallpaperama.com:80
######################################
#
#
<VirtualHost 70.238.57.57:80>
ServerName www.wallpaperama.com:80
ServerAdmin myemail@example.com
DocumentRoot /var/www/sites/wallpaperama/
ServerAlias wallpaperama.com
</VirtualHost>

CHANGE THE FOLLOWINGS TO YOUR SETTING:

70.238.57.57 ....................................(is whatever you ip address for the server is)

wallpaperama.com ...........................(whatever your domain name is)

/var/www/sites/wallpaperama/........(this is the location where the files for this site are going to be located)

myemail@example.com ....................(is the website administrator)



once you have made the chanages according to YOUR settings, save the file and reboot your http apache server with this command:


/etc/init.d/httpd restart



when you reboot, you will see a message like this:
Stopping httpd:                                            [  OK  ]

Starting httpd: [ OK ]



now open your website with your browser with the domain name. the system will try to find the index file in the /var/www/sites/wallpaperama/ directory (ei: index.php index.html) so make sure you have an index.php or index.html file in /var/www/sites/wallpaperama/



that's it, THIS TUTORIAL BROUGHT TO YOU BY WEBUNE.COM




ok, now that you have created your dns zone files and added your domain name to your apache server, the next step is going to be on how to create ftp account so you can upload your website files.




CLICK HERE TO CONTINUE WITH NEXT STEP: adding ftp user accounts



Share:
BBCODE:
HTML Code:


No Repies
(0) Comments for Add Websites To Web Server Adding Virtual Hosts Domain Names Apache Server

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload