Ruby on Rails
HowtoInstallOnTextDriveWithVirtualHosts2 (Version #5)

This is how I got Typo running under a subdomain of my main domain, which I’ll call domain.com for this howto.

Most of this was originally obtained from the excellent EJ wiki entry http://dev.elitists.textdriven.com/wiki/EJOnTextDriveRoot by htonl

NB: This assumes you’ve set up your database

Creating the virtual server / vhost

  1. Login to webmin
  2. Click on Virtualmin Virtual Servers
  3. Click on Add new virtual server
  4. Enter the subdomain for Domain Name (blog.domain.com)
  5. Make sure Create home directory? and Setup website for domain? are set to yes, you can set up the rest as you prefer
  6. Click Create Server and wait

You’ll now have the virtual server setup under ~/domains/blog.domain.com

Setting up the rails app

  1. Copy your rails app to a directory under the domain e.g. ~/domains/blog.domain.com/myblog
  2. From the webmin main page, click Apache Webserver
  3. Click on the Virtual Server link for blog.domain.com
  4. Click on document options
  5. Set Document root directory to /home/<username>/domains/blog.domain.com/myblog/public
  6. Click on Save
  7. Click on Apply Changes

Important: even though you’re not using the default public_html directory, do not delete it, rename it or move it under any circumstances, because it prevents Apache from restarting.

Final things

Ok, you now have two choice depending on whether you want the magic subdomain / directory thing to work or not

If you do

Send a ticket to textdrive saying you want blog.domain.com moved above *.domain.com in httpd.conf. I haven’t gone down this route, so your on you’re own with the nice TextDrive people

If you don’t

  1. From the webmin main page, click on Apache Webserver again
  2. This time, click on the Virtual Server for the main domain (domain.com)
  3. Click on Networking and Addresses
  4. In the Alternate virtual server names box, remove *.domain.com
  5. Click on Save
  6. Click on Apply Changes
  7. Go to <a href="http://blog.domain.com">http://blog.domain.com</a> and you should see your app!

Thanks

Many thanks to Dyrix on irc and JustinFrench by mail and irc for helping me make it work, and htonl for the original article

This is how I got Typo running under a subdomain of my main domain, which I’ll call domain.com for this howto.

Most of this was originally obtained from the excellent EJ wiki entry http://dev.elitists.textdriven.com/wiki/EJOnTextDriveRoot by htonl

NB: This assumes you’ve set up your database

Creating the virtual server / vhost

  1. Login to webmin
  2. Click on Virtualmin Virtual Servers
  3. Click on Add new virtual server
  4. Enter the subdomain for Domain Name (blog.domain.com)
  5. Make sure Create home directory? and Setup website for domain? are set to yes, you can set up the rest as you prefer
  6. Click Create Server and wait

You’ll now have the virtual server setup under ~/domains/blog.domain.com

Setting up the rails app

  1. Copy your rails app to a directory under the domain e.g. ~/domains/blog.domain.com/myblog
  2. From the webmin main page, click Apache Webserver
  3. Click on the Virtual Server link for blog.domain.com
  4. Click on document options
  5. Set Document root directory to /home/<username>/domains/blog.domain.com/myblog/public
  6. Click on Save
  7. Click on Apply Changes

Important: even though you’re not using the default public_html directory, do not delete it, rename it or move it under any circumstances, because it prevents Apache from restarting.

Final things

Ok, you now have two choice depending on whether you want the magic subdomain / directory thing to work or not

If you do

Send a ticket to textdrive saying you want blog.domain.com moved above *.domain.com in httpd.conf. I haven’t gone down this route, so your on you’re own with the nice TextDrive people

If you don’t

  1. From the webmin main page, click on Apache Webserver again
  2. This time, click on the Virtual Server for the main domain (domain.com)
  3. Click on Networking and Addresses
  4. In the Alternate virtual server names box, remove *.domain.com
  5. Click on Save
  6. Click on Apply Changes
  7. Go to <a href="http://blog.domain.com">http://blog.domain.com</a> and you should see your app!

Thanks

Many thanks to Dyrix on irc and JustinFrench by mail and irc for helping me make it work, and htonl for the original article