In this example I am using Ubuntu server with Apache Passenger.
Get an free account on http://freedns.afraid.org. You will see four name servers you can use to point your domain name to. You need to login to the service where you bought your domain name. In mine case I bought my domain name at godaddy.com, so I set the name servers over their web interface.
In the subdomain section setup A records for your domain name (http://domainname.com and http://www.domainname.com). Points both domain names into your Elastic IP Address.
If you want to run your test application on the same server set another A record for domain name http://test.domainame.com or http://staging.domainname.com and point them to the same Elastic IP Address.
In the next step you will need to configure your Apache Passenger.
There are two files where you need to add Virtual host settings.
Create a separate file for each of your domains and set name of the file to the name your domains (domainname.com and staging.domainname.com) in the following folder /etc/apache2/sites-available/ and paste this code inside. Do not forget to adjust the server IP address and paths.
<VirtualHost *:80>
ServerName ‘your_elastic_ip_address’
DocumentRoot ‘path_to_your_apps_public_folder’ // In my case I store my app on the elastic block in this folder /mnt/data/quantify/test/current/public
<Directory ‘path_to_your_apps_public_folder’ >
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
You will also need to add this virtual host block into the Apache configuration file which you will find in the following folder /etc/apache2
You will also need to tell the test server to use the Test rails environment setting.
You need to add “Raisl_Env = test” to apache config file.
Comments
This weblog seems to get a large ammount of visitors. How do you get traffic to it? It gives a nice individual twist on things. I guess having something useful or substantial to say is the most important thing.