Nginx + Puma + Sidekiq web interface not showing css styles

167 views
Skip to first unread message

Roberto Córdoba del Moral

unread,
Oct 6, 2020, 11:34:24 AM10/6/20
to sid...@googlegroups.com
Hi,

I’m having issues showing the css styles in the sidekiq web ui. I have read many posts but I’m not able to fix it. Anyone that can help?

Please find details in this post:
https://stackoverflow.com/questions/61539160/nginx-puma-sidekiq-web-interface

Best regards,
Roberto.

Mike Perham

unread,
Oct 6, 2020, 11:57:45 AM10/6/20
to sid...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Sidekiq" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sidekiq+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sidekiq/E7AFCD01-7DB0-4327-9FA1-03D9CCAE0961%40gmail.com.


--
Mike Perham – CEO, Contributed Systems
Smart, effective open source infrastructure for your apps.

Roberto Córdoba del Moral

unread,
Oct 6, 2020, 12:15:25 PM10/6/20
to sid...@googlegroups.com
Hello Mike,

  thanks for your answer. 

I have read the monitoring wiki page, but unfortunately I’m not able to make it work. 

I have found out the root cause of the problem in my nginx.conf. I have next rule that set a cache expiration time for performance purposes. If I comment this code, everything works. But how can I have both things living together?
    location ~* \.(?:css|js)$ {
            root  /Users/Rober/Projects/yanpy/dev/yanpy/app;
            expires 1w;
            add_header Cache-Control "public";
    }
Best,
Roberto.

Mike Perham

unread,
Oct 6, 2020, 12:27:21 PM10/6/20
to sid...@googlegroups.com
Sidekiq's CSS isn't in that root directory, so yeah, nginx is going to return 404.

Roberto Córdoba del Moral

unread,
Oct 6, 2020, 12:31:16 PM10/6/20
to sid...@googlegroups.com
Hello Mike,

  yes. I understand this. But I’m not skilled with sidekiq neither nginx conf. That´s why I’m asking how can I do to keep my existing cache rule and the sidekiq css working together.

Thanks for your help.

Best regards,

Mike Perham

unread,
Oct 6, 2020, 12:33:30 PM10/6/20
to sid...@googlegroups.com
I don’t know, I’m not super skilled with nginx.

Roberto Córdoba del Moral

unread,
Oct 7, 2020, 6:33:28 AM10/7/20
to sid...@googlegroups.com
Hello Mike,

  you mentioned in am email before that “Sidekiq's CSS isn't in that root directory, so yeah, nginx is going to return 404.”. My question is: where should the sidekiq´s css and js root directory be?

I´m able to manipulate the location, but I don’t know where is the right path. Please see from my nginx error.log file.

2020/10/07 12:29:23 [error] 60076#0: *1 open() "/sidekiq/stylesheets/bootstrap.css" failed (2: No such file or directory), client: ::1, server: , request: "GET /sidekiq/stylesheets/bootstrap.css HTTP/1.1", host: "localhost", referrer: "http://localhost/sidekiq"

Best regards,
Roberto.
  

Mike Perham

unread,
Oct 7, 2020, 11:34:14 AM10/7/20
to sid...@googlegroups.com

Roberto Córdoba del Moral

unread,
Oct 7, 2020, 11:54:35 AM10/7/20
to sid...@googlegroups.com
Hello Mike,

  I have been testing a lot of things, but unfortunately still not working. I have updated my stack overflow post with a lot of details including my whole nginx.conf file. Could you please have a look?

I’m able to show the css under certain circumstances, but still not completely working. 
My conclusion is that as soon as I include this line: location ~* \.(?:css|js)$ {} even if I leave the rule empty, the sidekiq css stop working.


Best regards,
Roberto.

Reply all
Reply to author
Forward
0 new messages