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.

Now when I test the app on my development machine I use:
paster serve --reload development.ini
and point my browser at localhost.

and that uses the Paste server which does not require the /xxx prefix
as it's the only server in use when I'm testing, therefore prefixing
the links to the static files with /xxx will cause them to be not
found. Hence the testing and production environments require different
paths to the static files.

Is there any way to fix this, I don't want to have to change the app
whenever I transfer it to the server?

--
Geoff

-- 
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