3

2

Currently we have a discussion forum at:

https://server.fogbugz.com/default.asp?forum

Can we use our own domain name? Such as

http://discuss.mycompany.com/default.asp?forum

Fog Creek Case FC2036591

flag
This question comes from our.fogbugz.com/default.asp?fogbugz.4.105187.4 – Peter Štibraný Nov 17 2009 at 18:25
1 
StackExchange is awesome. Previously, I had to recommend ProxyPass to users and just hope they figured it out.... and they would never come back to me with tips. It's great to have this info out here. – Rich Armstrong Nov 18 2009 at 22:47

2 Answers

2

Steps from suggested article ProxyPass for FogBugz On Demand with Your URL work fine. I want to provide few enhancements here.

First of all, you not only needs mod_proxy module, but also mod_proxy_http module. This module allows Apache to talk to remote servers via HTTP.

By default, Apache will not allow proxying for anybody. To enable it, use

ProxyRequests Off

<Proxy *>
    Order Allow,Deny
    Allow from all
</Proxy>

inside your VirtualHost declaration. Although ProxyRequests Off is default, this makes sure that it is indeed disabled. When enabled, it would turn your apache server into real proxy server, which is not what you want.

Furthermore, you might want to redirect requests from FogBugz root to your discussion forum:

RewriteEngine On

RewriteCond %{QUERY_STRING} =""
RewriteRule ^/default.asp$ /default.asp?forum [L,R]

RewriteCond %{QUERY_STRING} =""
RewriteRule ^/$ /?forum [L,R]

These two rules will redirect requests to / and /default.asp to your forum.

link|flag
any way to this with IIS? – Jedi Master Spooky Nov 23 2009 at 3:24
I am sorry, I don't know about IIS. Basic idea behind this solution is to setup a reverse proxy on your webserver, so when user access your server, the server fetches content from fogbugz on demand and sends it back to user. – Peter Štibraný Nov 24 2009 at 8:17
0

Today I found that GoogleBot accessed a lot of pages on my discussion forum, especially files in /help. It's not really helpful to have this accessed / indexed, so I decided to sent small robots.txt file to bots. Here is how I achieved it:

I've commented out my previous ProxyPass directive:

    # ProxyPass / https://server.fogbugz.com/

and added these rewrite rules:

    RewriteRule ^/robots.txt$ - [last]
    RewriteRule ^/(.*)$ https://server.fogbugz.com/$1 [proxy]

First rule simply allows sending robots.txt from my own server, while second one does the proxying (replacing commented ProxyPass directive from above). I've also added DocumentRoot directive to set path to my static content.

My entire configuration now looks like this:

<VirtualHost *:80>
    ServerAdmin webmaster@mycompany.com
    ServerName discuss.mycompany.com

    SSLProxyEngine on

    ProxyRequests Off

    # ProxyPass / https://server.fogbugz.com/
    ProxyPassReverse / http://server.fogbugz.com/
    ProxyPassReverse / https://server.fogbugz.com/
    ProxyPassReverseCookieDomain server.fogbugz.com discuss.mycompany.com

    <Proxy *>
        Order Allow,Deny
        Allow from all
    </Proxy>

    DocumentRoot /home/www/discuss.mycompany.com/htdocs

    RewriteEngine On

    RewriteCond %{QUERY_STRING} =""
    RewriteRule ^/default.asp$ /default.asp?forum [last,redirect]

    RewriteCond %{QUERY_STRING} =""
    RewriteRule ^/$ /?forum [last,redirect]

    RewriteRule ^/robots.txt$ - [last]
    RewriteRule ^/(.*)$ https://server.fogbugz.com/$1 [proxy,last]
</VirtualHost>

My robots.txt for now:

User-Agent: *
Disallow: /help/
link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.