When you try FogBugz On Demand you’re asked to choose a subdomain for your account which will result in a url like this: bigcompany.fogbugz.com.
Ian M. Jones, maker of Case Detective and frequent contributor on the Fog Creek discussion forums, wrote in to customer support because he was trying to set a CNAME alias in his DNS file so that support.bigcompany.com would direct to his On Demand account, which, in our example, would be bigcomapny.fogbugz.com. In theory this should work, but it kept failing.
In Ian’s case he wanted to do this so RBScoutSubmit would still work without the need to rewrite some of his existing code. Most people probably don’t have this specific need, but you might want to do this so you could direct your customers to your On Demand account but display a different url through the whole transaction.
After some investigating I discovered that we have two problems both of which we intend to fix. As is often the case, though, there are a lot more pressing things to attend to at the moment. The first problem is that our system doesn’t know how to associate your custom subdomain to your existing On Demand account. This is a trivial thing to fix. More problematic is the fact that we serve everything over https. This isn’t a problem itself--it’s good--but we have an ssl cert for the whole fogbugz.com domain, and not for any other domains that might be directing to the fogbugz.com domain. We probably don’t want to get into the business of managing ssl certs for other people so they can do this redirect, although that would be one way to solve the problem.
Ian wrote in the next morning with his own clever solution which he describes here: http://www.ianmjones.net/archives/2007/07/24/switched-to-fogbugz-on-demand-workaround-for-changed-scoutsubmit-url/
Meanwhile Michael Gorsuch, our sys admin, had been thinking over night about using the Apache ProxyPass directive as a work around. After a little experimenting he got it to work.
You need to make sure that both mod_proxy and mod_ssl are installed on your Apache server. Then create a new virtual server that proxies everything from itself to your On Demand service. Like this:
<VirtualHost *:80>
ServerName support.yourdomain.com
ServerAdmin webmaster@localhost
SSLProxyEngine on
ProxyPass / https://youraccount.fogbugz.com/
ProxyPassReverse / https://youraccount.fogbugz.com/
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>
Then restart Apache, and you should be all set.
Obviously with a simple redirect on IIS or Apache you would go from support.bigcompany.com to bigcompany.fogbugz.com. With the ProxyPass directive in place you can now send your customers to your On Demand account all the while displaying the url support.bigcompany.com