Adding a new site and feeling good about it

August 21, 2010 3:17 pm Published by Leave your thoughts

Say you have a running Linux box on Rackspace and wish to add a new web site to its virtual servers. Don’t let any *nix ninja tell you it’s simple/quick/fun. Here’s why:

1. Register a domain (newsite.com) and point its DNS to DNS1.STABLETRANSIT.COM, DNS2.STABLETRANSIT.COM

2. SSH your Rackspace site and create a new VirtualHost:

mkdir /home/user/newsite.com

vi /home/user/newsite.com/index.html

Welcome to newsite.com!

vi /etc/apache2/sites-available/newsite.com

<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName newsite.com
DocumentRoot /home/user/newsite.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/user/newsite.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>

a2ensite newsite.com

/etc/init.d/apache2 reload

3. Login at manage.rackspacecloud.com

Hosting – Cloud Servers – myserver – DNS – Add – newsite.com – Add – Type A, newsite.com, my IP, 300

now we wait…

Categorised in:

This post was written by admin

Leave a Reply

Your email address will not be published.