Click to See Complete Forum and Search --> : 3 Domain Hosting on VPS


prettyskin
03-16-2009, 09:13 PM
How to setup domain host on a virtual private server running Fedora Core 5? I have two other domains running on the server and I need to add the third domain. I don't know how to get the server prepared for the new domain website. :(

prettyskin
03-17-2009, 09:36 PM
1. Create a new directory in cd /var/www or www2
2. Change permission on the directory ex: chmod -R 755 www or www2
3. Create the entry in the apache configuration file
a. Open the httpd.conf file: /etc/httpd/conf/httpd.conf
b. Create a new VirtualHost container for the website. Each website must have its own container within the httpd.conf file.
<VirtualHost 65.36.160.111:80>
ServerAdmin webmaster@domainname.com
DocumentRoot /var/www/html/
ServerName www.domainname.com
ServerAlias domainname.com
ErrorLog /var/www/logs/www_error_log
CustomLog /var/www/logs/www_access_log common

<Directory /var/www/cgi-bin/>
Options +ExecCGI
AddHandler cgi-script cgi pl
</Directory>


Go to for more direction: http://httpd.apache.org/

4.Test the site
a. Test your apache configure file by typing the following:
/usr/sbin/apachectl configtest

You should see:
Syntax OK

Note: If it returns an error, please review the error message, make the necessary corrections and rerun the command.

b. Restart the web service by typing the following:
/usr/sbin/apachectl graceful

c. Change to the www/html directory by typing the following:
cd /var/www/html

d. Create a test file ex: index.html
e. Enter some text and save the file

f. Open the index.html page within a web browser. You should see your site.

Done!