April 20, 2016 2.8k views
DNS Nginx Ruby on Rails Ubuntu

codeHello, I am having the following error when I access to my app (, configured with nginx & puma server: "ERRTOOMANY_REDIRECTS"

Here is my NgInx site-enabled configuration:

upstream puma {
  server unix:///path/to/my/app- puma.sock;

server {

  listen 80;

  location / {
    rewrite ^/(.*)$1 permanent;


server {

  listen 443 ssl;

  ssl_certificate /path/to/my/certs/;
  ssl_certificate_key /path/to/my/certs/;

  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_prefer_server_ciphers on;

  root /path/to/my/rails/app/public;
  access_log /path/to/my/rails/app/log/nginx.access.log;
  error_log /path/to/my/rails/app/log/nginx.error.log info;

  location ^~ /assets/ {
    gzip_static on;
    expires max;
    add_header Cache-Control public;

  try_files $uri/index.html $uri @puma;
  location @puma {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;

    proxy_pass http://puma;

  error_page 500 502 503 504 /500.html;
  client_max_body_size 10M;
  keepalive_timeout 10;


I have an account in Godaddy, and my domain is registered there. In Godaddy I have the Name Servers pointing to DigitalOcean:


I just want to know a few things:

  1. There is something wrong in my virtual server?
  2. What else do I have to pay attention to solve this problem. It is possible that is something wrong in my app?

Regards, (And sorry about my english)

1 comment
  • Hi! I am able to access your website without any issues. Are you still experiencing this issue? Does it only happen on certain URLs?

1 Answer

Estou com o mesmo erro em meu site de cifras simplificadas :( Cifra simplificada

Have another answer? Share your knowledge.