" pylons + nginx " error 404 not found for all styles, scripts, images

105 views
Skip to first unread message

vijay

unread,
Nov 17, 2012, 8:00:01 AM11/17/12
to pylons-...@googlegroups.com

Hello,

I am changing my pylons application environment from apache to nginx.

I am able to start the pylons with nginx, but while displaying page its not able to access any of the css, script, image files.

If anyone knows why this is happening. It will be a great help for us.


Thanks,

Vijay

León Domingo

unread,
Nov 17, 2012, 9:52:11 AM11/17/12
to pylons-...@googlegroups.com
Hi Vijay,
Your NGINX configuration file will give us more information.

How do you communicate nginx with pyramid? Gunicorn? That's my choice for deployment (NGINX+gunicorn)

Regards,
León Domingo

Ender - Factoría de Software
leon.d...@ender.es
Avda. Cerro del Águila, 7. S23 - 2ª Planta
28703 S.S. de los Reyes (MADRID)
Tlf. 902 01 44 01

   



--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/vo9Jkj42QPMJ.
To post to this group, send email to pylons-...@googlegroups.com.
To unsubscribe from this group, send email to pylons-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.

pin...@vvidiacom.com

unread,
Nov 17, 2012, 1:04:59 PM11/17/12
to pylons-...@googlegroups.com
Hi Leon,

We are using paster with pylons.
Nginx acts as a proxy (proxy pass and reverse proxy).

The configuration file for nginx is as per the directives for reverse proxy.

This has earlier worked with apache but now we are facing issues with nginx as mentioned in vijay's mail.

Regards,
Pinakee
Sent on my BlackBerry® from Vodafone

From: León Domingo <leon.d...@ender.es>
Date: Sat, 17 Nov 2012 15:52:11 +0100
Subject: Re: " pylons + nginx " error 404 not found for all styles, scripts, images

Andi

unread,
Nov 17, 2012, 1:15:34 PM11/17/12
to pylons-...@googlegroups.com, Andi Balke
sorry, but your description is zero helpful. 

if you can reproduce the problem locally set logging to debug and see the rewrites.

or send the config :)

andi

(sent right out of my head)

Pinakee Biswas

unread,
Nov 17, 2012, 10:14:54 PM11/17/12
to pylons-...@googlegroups.com, Andi Balke

Hi Andi,

 

Thanks for the response.

 

PFA the nginx configuration file.

 

Please let us know if any other info would be needed.

 

Looking forward to your response and help…

 

Thanks,

Pinakee

nginx.conf

Carlos Daniel Ruvalcaba Valenzuela

unread,
Nov 18, 2012, 12:38:51 AM11/18/12
to pylons-...@googlegroups.com
The answer is simple, your current setup is not serving any css, js or any other static files, set nginx to serve your static files folder. For example, add inside your server section:

location /static {
                alias /path/to/my/static/files;
                expires 1d;

pin...@vvidiacom.com

unread,
Nov 18, 2012, 1:49:48 AM11/18/12
to pylons-...@googlegroups.com
Hi Carlos,

Thanks for your response. We would follow your suggestion.

We are kind of new to nginx. Earlier we were using apache.
We were using apache as proxy and paster was serving resources/data. Apache wasn't used for serving the resources.
We were trying to have similar setup with nginx and we were not sure if that would work.
Please let us know if the above is possible with nginx.

Thanks,

Pinakee
Sent on my BlackBerry® from Vodafone

From: Carlos Daniel Ruvalcaba Valenzuela <clsd...@gmail.com>
Date: Sat, 17 Nov 2012 22:38:51 -0700
Reply all
Reply to author
Forward
0 new messages