Oddly enough I tried an arbitrary path '/foo' prepended in the config and
tested from the browser and that worked.  I then took /foo out (in routes)
leaving just '/' and that worked.  I could swear I tried that previously.
 Anyway it seems to work now.  For what it is worth the hack config is
attached.


On Mon, Sep 30, 2013 at 4:51 PM, Henry Finucane <[email protected]>wrote:

> I don't entirely understand what's going on, but it sounds like you have a
> syntax error in your mongrel2 config. Would you mind posting it?
>
> Regarding static files, I usually do something like this:
>
>         Host(name="localhost", routes={
>             '/static': Dir(base='static/', index_file='index.html',
>                              default_ctype='text/plain'),
>             '/': Proxy(addr='127.0.0.1', port=9988)
>         })
>
> Where static assets live in a folder called 'static', get served from
> '/static/js', '/static/css', etc., and the application handles everything
> else. You could also add explicit /js and /css routes if you wanted cleaner
> URLs.
>
>
>
>
> On Mon, Sep 30, 2013 at 4:02 PM, Samantha Atkins <[email protected]>wrote:
>
>> I have what was a bottle.py setup with my web directory at top level
>> containing a main application in a file foobar.html. I found if there is no
>> route for '/' then I couldn't do anything with it.  But when I tried
>> various configurations I got either no resource at all or "Failed to
>> normalize base path: ,/ or complaints when I attempted to load the
>> configuration.  What is the proper way to do this?  It seems like something
>> elementary but none of the examples I have seen seem to show me something
>> quite like it.  Or I am missing it.  Thanks for any help.
>>
>> I am starting from my top level web app directory.  I presume that makes
>> some difference.  But I could be wrong about that.
>>
>> A related question is whether I need to make routes explicitly for js
>> files in subdirs 'js' and 'lib' and for css is subdir 'css'.
>>
>> - samantha
>>
>
>
>
> --
> -----------------------
> | Henry Finucane
> | (510) 473-7148
> -----------------------
>

Attachment: mongrel.conf
Description: Binary data

Reply via email to