Sample REAL Studio web app running on DreamHost: http://www.pharmacaidonline.com/WebAppTest.fcgi
Also refer to my earlier post, Deploying Web Apps with REAL Studio Web Edition.
DreamHost offers a free one week trial of their VPS offering, so I decided to give it a try. Their setup is a bit unique. First, you have to create an account and then add the regular hosting plan ($9/month) to it. This is a “shared hosting” account so don’t expect REAL Studio WE to work with it. Next you have to add a VPS to your account (clicked Enable VPS Service) in the VPS section of the control panel. It can take up to a day for your VPS to get added to your account. Once your VPS is set up, you need to move your domain to it, which you can do by clicking Manage Domains in the Domains section. This can take up to 6 hours for the DNS to propogate (it took almost exactly 6 hours for me). DreamHost gives you 1 week free to test out the VPS. Hopefully with these instructions you can get up and running quickly. Their VPS plans start at an addition $15/month depending on RAM that you require. It would be wise to do some serious load testing of your web app during the free week to see what you might need for RAM.
FYI: DreamHost using Debian 64-bit Linux, bu the 32-bit compatibility libraries must be installed because a simple Linux console app runs just fine.
In the control panel, you’ll want to disable DreamHost managed Web Server Configuration in the Server Configuration settings. This will let us edit httpd.conf directly and will prevent any changes done in the control panel from messing up our changes.
Now you’ll want to create an admin user for your VPS. This is needed so that you can SSH into your account (with root access) and change the Apache configuration file. Once you’ve created your admin user, start Terminal (I’m using Mac OS X). Then type:
You’ll be prompted for you admin user password. After you login, you’ll be at the Linux command prompt.
Now we need to edit the Apache configuration file (httpd.conf). First we’ll need to switch directories:
Now you’ll want to open httpd.conf for editing:
sudo pico apache2-psXXXXX/etc/httpd.conf
Replace the X’s above with your VPS server numbers.
In the configuration file, you’ll need to make similar changes to what I described in my previous post regarding FastCGI. The big difference is that DreamHost is using a Virtual Host in Apache and it is also using both mod_fastcgi and mod_fcgid. The way FCGID is configured by default prevents FastCGI from working with REAL Studio web apps, but it is pretty easy to change.
Find the section of the configuration file that says <IfModule mod_fastcgi.c>. Within this section, add the AddHandler command:
AddHandler fcgi-script .fcgi
Find the section containing the Virtual Host information for your domain. It should be prefixed with a comment: ## yourdomain.com : dsid …
Find the line that starts with Options. After this line, add AllowOverride All.
In this same section, scroll down to the line AddHandler fcgid-script fcg fcgi fpl and comment it out by adding a ‘#’ in front.
Save the file (Control-O, then enter) and exit Pico (Control-X). You might want to restart Apache just to be safe:
sudo /etc/init.d/httpd2 restart apache2-psXXXXX
(Remember to replace the X’s with your server number.)
Update (12/17/2010): I have no idea why this step is necessary, but without it I don’t get web apps to load, instead the browser tries to download them!
Create a new file called “.htaccess”. The “.” is important! In the file add these two lines:
Options ExecCGI AddHandler fastcgi-script .fcgi
Save the file to the your web domain folder.
Now you can run your REAL Studio web apps by simply copying them into your domain folder (yourdomain.com).