I am having the double slash error.

Asked by Kyle Hotchkiss on 2009-07-02

I have to have a double slash in the URL to correctly access my branches, but it loads the home page (with out double slashes) fine. It also appears that the urls for the static files only need 1 slash.

I am using loggerhead through an Apache proxy.

Question information

English Edit question
loggerhead Edit question
No assignee Edit question
Solved by:
Matt Nordhoff
Last query:
Last reply:
Matt Nordhoff (mnordhoff) said : #1

Wait, what? Never heard of that one before.

What version of Loggerhead? Have you tried the trunk (lp:loggerhead)?

What exactly is the issue? Where do you need double slashes?

What error does Loggerhead give?

Are you running it with start-loggerhead, serve-branches, or "bzr serve --http"?

Matt Nordhoff (mnordhoff) said : #2

Could you have misconfigured the Apache proxy somehow?

Kyle Hotchkiss (kylehotchkiss) said : #3

Okay so I have Apache proxying the loggerhead server w/ ubuntu. So it's start-loggerhead. It's version 1.10
So I type in http://mercury/code and the home page with the branches comes up fine.

then I click the link for one of my branches which is http://mercury/code/websites/kylehotchkiss.com and I get a WSGI not found error.

then I type in http://mercury/code//websites/kylehotchkiss.com and it works fine. That's where the double slash is.

apache config:

    <Location "/code">
      Order allow,deny
      allow from all


 - - - - -

Here is my Loggerhead Config:
# use this to change the server's port
#server.socket_port = 8080

# use this if you're mapping loggerhead within apache via proxy
server.webpath = 'http://mercury/code/'

# use this if you want loggerhead to listen to another interface than
# server.socket_host = 'your_hostname_or_ip'

# where's bzrlib?
# (you only need this if you don't install bzr.)
# bzrpath = '/Users/robey/code/bzr/bzr'

# if you want a special title on the front page, set it here:
title = 'khp::code'

# the access and debug logs can be set up to roll 'daily', 'weekly', or 'never':
log.roll = 'weekly'

# group branches by project:

    # name of this project
    name = 'Websites'

    # for the top browsing page, you can include a description, in raw HTML.
    description = 'Kyle Hotchkiss Productions - Websites.'

    # should we cache files changed? (recommended for large trees)
    # this will be a folder containing one file. if the folder doesn't
    # exist, it'll be created.
    # all branches in this project will share the same cache, which is usually
    # what you want if they share a repository. if not, you can also specify
    # this per-branch.
    cachepath = '/var/bzr/.bzr/loggerhead-files'

    # each branch is in a sub-folder of the website, and the config
    # key describes that folder name:

        # where is the bazaar branch located?
        folder = '/var/bzr/kylehotchkiss.com'

        # (optional) is there a friendier name for the branch that i should
        # use on the web pages?
        # you can also define this using the branch's nickname.
        branch_name = 'Kyle Hotchkiss Online'

        # (optional) short description for the top-level page
        # you can also define this using the "description" config key in the
        # branch's 'branch.conf'.
        description = "Personal Website"

        # (optional) public branch url for the top-level page
        # you can also define this using the "public_url" config key in the
        # branch's 'branch.conf'.
        #url = 'http://bazaar-ng.org/bzr/bzr.dev'


        folder = '/var/bzr/productions.kylehotchkiss.com'

        branch_name = 'Kyle Hotchkiss Productions'

        description = "Business Site"

        #url = 'http://bazaar-ng.org/bzr/bzr.dev'

# here's an example of an auto-published folder:
   # name = 'KHP'
    #cachepath = '/var/bzr/.bzr/loggerhead-files'

    # if an auto_publish_folder is given, any bazaar branches discovered in
    # that folder will be published. using each branch's 'branch.conf' to
    # provide optional descriptions and public urls is a nice way to avoid
    # having to do much configuration here.
    #auto_publish_folder = '/var/bzr'

    # if all of the branches under an auto_publish_folder are exported to
    # the same (base) public url, you can specify that url prefix here, and
    # each discovered branch's public url will be generated.
   # url_prefix = 'http://Mercury/code/'

Best Matt Nordhoff (mnordhoff) said : #4

Sorry, but I don't have experience with start-loggerhead, Apache, or
Loggerhead 1.10. :-D

All I can suggest is testing removing the trailing slash from different
bits of your configuration, e.g.:

> ProxyPass
> ProxyPassReverse

> # use this if you're mapping loggerhead within apache via proxy
> server.webpath = 'http://mercury/code/'

I'd try server.webpath first. I just checked loggerhead.conf.example,
and it does not include a trailing slash.

Kyle Hotchkiss (kylehotchkiss) said : #5

Hey man, It worked!
Sorry to use your valuable time solving an Apache configuration problem, but thanks!

Kyle Hotchkiss (kylehotchkiss) said : #6

Thanks Matt Nordhoff, that solved my question.