codeHello, I am having the following error when I access to my app (, configured with nginx & puma server: “ERR_TOO_MANY_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)


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

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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