1

1

Currently, FogBugz for Linux wants to go in http://mysite/fogbugz/. How do I put it in http://mysite/ instead?

flag

1 Answer

2

The fogbugz setup script only makes one change to your main apache's httpd.conf file. It adds and "include" statement at the end to import the fogbugz-redirect.conf file in /opt/fogbugz/conf. To change to having FogBugz at the root of your webserver, you need to put the redirect in your main apache config file in a VirtualHost.

In your main apache httpd.conf,

  1. Remove or comment out the line that FogBugz added which includes fogbugz-redirect.conf

  2. Add a virtual host with the proxypass directives

 

<VirtualHost *:80>
    ServerAdmin youradmin@yoursite.com
    ServerName oursite.com
    ServerAlias www.adambox.oursite.com
    ProxyPass / http://localhost:7066/fogbugz/
    ProxyPassReverse / http://localhost:7066/fogbugz/
    #Default proxy timeout of 21 minutes, 1 minute longer than the longest FogBugz page timeout
    ProxyTimeout 1260
</VirtualHost>

You can also try this more thorough version if you use SSL:

<VirtualHost *:80>
    ServerAdmin admin@example.com
    ServerName  fogbugz.example.com
    ServerAlias fogbugz
    ServerSignature Off
    LogLevel warn
    ErrorLog  /var/log/apache2/fogbugz-error.log
    CustomLog /var/log/apache2/fogbugz-access.log combined

    # Change to root --#
    RedirectMatch /$ http://fogbugz/
    ProxyPreserveHost On
    ProxyPass / http://localhost:7066/
    ProxyPassReverse / http://localhost:7066/
    <Proxy http://localhost:7066/* >
    Order deny,allow
    Allow from all
    </Proxy>
    ProxyTimeout 1260

</VirtualHost>
<VirtualHost *:443>
    SSLEngine On
    SSLCertificateFile /etc/apache2/ssl/apache.pem
    ServerAdmin admin@example.com
    ServerName  fogbugz.exampl.ecom
    ServerAlias fogbugz
    ServerSignature Off
    LogLevel warn
    ErrorLog  /var/log/apache2/fogbugz-error.log
    CustomLog /var/log/apache2/fogbugz-access.log combined

    #-- Change to root --#
    ProxyPreserveHost On
    ProxyPass / http://localhost:7066/
    ProxyPassReverse / http://localhost:7066/
    <Proxy http://localhost:7066/* >
    Order deny,allow
    Allow from all
    </Proxy>
    ProxyTimeout 1260
link|flag
This almost works perfectly for me. The only problem is almost all the plugins fail to load when loading the site using the base url as opposed to :7066. System.MissingMethodException: No constructor found for FogCreek.FogBugz.Reporting.Reporting::.ctor(FogCreek.FogBugz.Plugins.Api.CPluginApi) at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] at System.Activator.CreateIns – William W Jun 16 at 1:41
That was not formatted as I had intended, and I apparently can't edit it. Here's one of the errors in full. They all look virtually the same except for the plugin name. pastebin.com/HrCydapa – William W Jun 16 at 1:44
@william, that error is un-related to how apache is setup. It's a known issue that's pretty easy to fix. please write us at customer-service@fogcreek.com and we'll help out – adambox Jun 18 at 13:03

Your Answer

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