{"action":"created","issue":{"url":"https://api.github.com/repos/mperham/sidekiq/issues/900","repository_url":"https://api.github.com/repos/mperham/sidekiq","labels_url":"https://api.github.com/repos/mperham/sidekiq/issues/900/labels{/name}","comments_url":"https://api.github.com/repos/mperham/sidekiq/issues/900/comments","events_url":"https://api.github.com/repos/mperham/sidekiq/issues/900/events","html_url":"https://github.com/mperham/sidekiq/issues/900","id":13987229,"number":900,"title":"Sidekiq assets (stylesheets and javascript) returning a 404","user":{"login":"mattheworiordan","id":43789,"avatar_url":"https://avatars.githubusercontent.com/u/43789?v=3","gravatar_id":"","url":"https://api.github.com/users/mattheworiordan","html_url":"https://github.com/mattheworiordan","followers_url":"https://api.github.com/users/mattheworiordan/followers","following_url":"https://api.github.com/users/mattheworiordan/following{/other_user}","gists_url":"https://api.github.com/users/mattheworiordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattheworiordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattheworiordan/subscriptions","organizations_url":"https://api.github.com/users/mattheworiordan/orgs","repos_url":"https://api.github.com/users/mattheworiordan/repos","events_url":"https://api.github.com/users/mattheworiordan/events{/privacy}","received_events_url":"https://api.github.com/users/mattheworiordan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2013-05-06T03:15:06Z","updated_at":"2016-07-11T02:37:51Z","closed_at":"2013-05-06T11:50:10Z","body":"I have mounted Sidekiq in a sub-folder as follows:\r\n\r\n    admin_constraint = lambda { |request| request.env[\"warden\"].authenticate? and request.env['warden'].user.admin_rights? }\r\n    constraints admin_constraint do\r\n      mount Sidekiq::Web => '/bunker/sidekiq'\r\n    end\r\n\r\nLocally this works fine, however when I push to my staging or production servers I get 404 errors on those assets when trying to view the Sidekiq admin interface.\r\n\r\nAn example URL that returns a 404 is `http://my-domain.com/my-folder/sidekiq/stylesheets/bootstrap.css`\r\n\r\nI am on Rails 3.2.11, I am using `Rack::ForceDomain` and `Rack::Deflated` middleware.\r\n\r\nI am tempted to just serve those files locally and create my own manual routes, but that does seem unnecessary.  Shout if you want any further information to help diagnose the issue.\r\n\r\nThanks,\r\nMatt"},"comment":{"url":"https://api.github.com/repos/mperham/sidekiq/issues/comments/231630060","html_url":"https://github.com/mperham/sidekiq/issues/900#issuecomment-231630060","issue_url":"https://api.github.com/repos/mperham/sidekiq/issues/900","id":231630060,"user":{"login":"sorentwo","id":270831,"avatar_url":"https://avatars.githubusercontent.com/u/270831?v=3","gravatar_id":"","url":"https://api.github.com/users/sorentwo","html_url":"https://github.com/sorentwo","followers_url":"https://api.github.com/users/sorentwo/followers","following_url":"https://api.github.com/users/sorentwo/following{/other_user}","gists_url":"https://api.github.com/users/sorentwo/gists{/gist_id}","starred_url":"https://api.github.com/users/sorentwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorentwo/subscriptions","organizations_url":"https://api.github.com/users/sorentwo/orgs","repos_url":"https://api.github.com/users/sorentwo/repos","events_url":"https://api.github.com/users/sorentwo/events{/privacy}","received_events_url":"https://api.github.com/users/sorentwo/received_events","type":"User","site_admin":false},"created_at":"2016-07-11T02:37:51Z","updated_at":"2016-07-11T02:37:51Z","body":"The `try_files` directive takes a fallback location as the last parameter. It requires at least two parameters, as you can see in the [official documentation](http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files). Often you put `try_files` outside of the location block instead. Something more like this:\r\n\r\n```conf\r\n  try_files $uri @app;\r\n\r\n  location ~ ^/(assets)/  {\r\n    gzip_static on;\r\n    expires     max;\r\n    add_header  Cache-Control public;\r\n    log_not_found off;\r\n  }\r\n\r\n  location @app {\r\n    # put your proxy params here\r\n  }\r\n```\r\n\r\nThere are infinite possibilities, tons of documentation and plenty of recipes out there."}}
{"actor":{"display_login":"sorentwo"}}