0

I have hit a wall trying to fix a problem with my openProject installation. I installed it following the instructions in this guide. Then, I added an A record for my public IP and subdomain using world4you. I also created SSL certificates with Let's Encrypt:

mkdir /var/www/certbot/openproject.invert.at
certbot certonly --webroot -w /var/www/certbot/openproject.invert.at -d openproject.invert.at

Then I created and modified a file named /etc/nginx/sites-enabled/openproject.eeg_invert.de as follows:

server {
    listen 80;
    listen [::]:80;
    listen 443 ssl;
    listen [::]:443 ssl;

    # ssl_certificate /etc/letsencrypt/live/openproject.eeg_invert.de/fullchain.pem;
    # ssl_certificate_key /etc/letsencrypt/live/openproject.eeg_invert.de/privkey.pem;

    access_log /var/log/nginx/access_openproject.eeg_invert.de.log;
    error_log /var/log/nginx/error_openproject.eeg_invert.de.log;

    server_name openproject.eeg_invert.de;
    if ($http_user_agent ~* ".*SemrushBot.*") {return 403;}

    location '/.well-known/acme-challenge' {
        root /var/www/certbot/openproject.eeg_invert.de;
    }

    location / {
        if ($scheme = http) {
            return 301 https://$server_name$request_uri;
        }
        proxy_set_header     X-Script-Name /;
        proxy_set_header     X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header     X-Remote-User $remote_user;
        proxy_set_header     Host $http_host;
        # proxy_redirect http:// https://;
        proxy_pass http://localhost:8080;

    }
}

I reloaded nginx and everything worked just fine. However, I updated this application using cd /docker/openproject/compose && docker-compose pull && docker-compose up -d and reloaded nginx but now I am getting this message on chrome:

This page isn’t working openproject.eeg_invert.de redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS

I backed up all relevant docker volumes and the entire project folder (where the compose file is located) before updating. I am in no way an expert in IT so what I did so far is to run docker-compose down after updating. Then I restored the project folder and ran docker-compose up -d.

The problem is that now I am still getting the same error. I looked at the nginx error log files, but nothing comes up. I tried disabling some of the options at random from the nginx files to see if that changes something but it is always the same.

I have hit a wall now and I would very much appreciate your help! Thanks in advance for any suggestions or ideas you may have.

1 Answers1

0

Did you try clearing cookies in your browser? There are many reasons why this issue can occur:

  • Issues with the browser's cache/cookies. The browser may be caching faulty data that leads to the redirection error.
  • The browser extensions. Sometimes a browser extension can cause a redirection error.
  • The website's URL. A misconfiguration in URL settings can cause the redirection error.
  • WordPress cache. The website cache could be causing a redirect loop.
  • SSL certificate. A misconfigured security protocol (SSL certificate) can cause a redirect loop.
  • Third-party services and plugins. A faulty WordPress plugin could be causing the redirection loop.
  • The site's .htaccess file. A user-level configuration file WordPress uses to rewrite URLs to the index.php file. The website URL is defined as a value in the database.
Abhishek S
  • 546
  • 3
  • 16
  • I did clear the cookies on my browser. However, I set an environment variable HTTPS to false on the compose file like this: OPENPROJECT_HTTPS: "${OPENPROJECT_HTTPS:-true}" and now I have access to the website, but now I am even more confused. – arann29 Nov 10 '22 at 16:50