On Mon, 2011-09-05 at 08:26 -0700, Sascha Boch wrote:
> Hi there,
>
> I followed the example on the following page to deploy my app using
> nginx:
>
> https://docs.pylonsproject.org/projects/pyramid_cookbook/dev/deployment.html#nginx-paster-supervisord
>
> The problem is that I need to use a different port than port 80 for
> the outside world. In my configuration, Nginx is listening to port
> 8002 and paster to port 8001. Like in the example, I want Nginx to
> serve the static content in the static folder of the application.
> However, since request.application_url does NOT include the port, the
> links in the content generated by pyramid point to port 80. Therefore,
> all CSS and JS gets lost in the server response. Is there anything
> that I can change in myapp.conf or nginx.conf or in my app so that
> request.application_url points to the correct port?
Sounds like you need the nginx equivalent of Apache's
"ProxyPreserveHost". That seems to be:
proxy_set_header Host $host;
.. as per the document you linked. Maybe something needs to be jiggled
in the nginx config to pass along the port in the host header too?
Apache does this by default, IIRC, so not quite sure.
- C
--
You received this message because you are subscribed to the Google Groups
"pylons-devel" 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-devel?hl=en.