Rails Sidekiq configuration on Reverse Proxy.

Rahul Ojha
Jun 1 · 2 min read

Background

www.domain.com/rails-api-1/REST_ROUTES
www.domain.com/rails-api-2/REST_ROUTES
www.domain.com/rails-api-3/REST_ROUTES
www.domain.com/rails-api-4/REST_ROUTES
mount Sidekiq::Web => '/sidekiq'
mount Sidekiq::Web => '/rails-api-1-sidekiq'
Key => traefik.sidekiq.frontend.rule 
Value => Host:www.domain.com;PathPrefix:/rails-ap1-1-sidekiq
location /rails-ap1-1-sidekiq/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://your_domain/rails-ap1-1-sidekiq/;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}
location /rails-ap1-2-sidekiq/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://your_domain/rails-ap1-2-sidekiq/;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}
https://www.domain.com/rails-api-1-sidekiq/retries
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade