On Tue, May 24, 2011 at 12:37:42PM -0700, Geoff wrote:
Hello,

> I've been developing a small pylons app in my spare time and I just
> got around to putting it onto a server for the first time and
> discovered that the static files under /public were not being served.
> I have tracked down the problem but I'm not sure of the answer, I hope
> I can describe it well enough ...
> 
> On the server I have a web-site already, let's say it's www.mysite.com.
> The pylons app sits under /xxx so to access the app on the web the URL
> is  www.mysite.com/xxx.
> 
> Now the web server recognises the /xxx and hands over to the WSGI
> server which is Flup which then serves the pylons app. The problem
> with the static files is that they need to be prefixed /xxx for the
> web server to hand over to Flup.

How did the paths to the static files are generated in your templates or
in your code?

I'm not sure, but I believe that if you use `request.static_url()`
method, Pyramid is going to generate the right URL, depending on which
path your application is mounted on.

See
http://docs.pylonsproject.org/projects/pyramid/1.0/narr/assets.html#generating-static-asset-urls
for more details.

 Jonathan

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to