Question

Mastodon One-Click Install 301 Loops

I used the one-click install of mastodon and after running the setup on the node I get 301 loops.

root@mastodon:~# sudo journalctl -u mastodon-web
No journal files were found.
-- No entries --

No logs from Mastodon

root@mastodon:~# tail -f /var/log/nginx/access.log
[ip address] - - [17/Dec/2022:03:28:30 +0000] "GET / HTTP/1.1" 301 178 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15"
[ip address] - - [17/Dec/2022:03:28:30 +0000] "GET / HTTP/1.1" 301 178 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15"
[ip address] - - [17/Dec/2022:03:28:30 +0000] "GET / HTTP/1.1" 301 178 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15"
[ip address] - - [17/Dec/2022:03:28:30 +0000] "GET / HTTP/1.1" 301 178 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15"
[ip address] - - [17/Dec/2022:03:28:30 +0000] "GET / HTTP/1.1" 301 178 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15"
[ip address] - - [17/Dec/2022:03:28:30 +0000] "GET / HTTP/1.1" 301 178 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15"
[ip address] - - [17/Dec/2022:03:28:30 +0000] "GET / HTTP/1.1" 301 178 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15"
[ip address] - - [17/Dec/2022:03:28:30 +0000] "GET / HTTP/1.1" 301 178 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15"
[ip address] - - [17/Dec/2022:03:28:30 +0000] "GET / HTTP/1.1" 301 178 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15"
[ip address] - - [17/Dec/2022:03:28:31 +0000] "GET / HTTP/1.1" 301 178 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15"

I tried rerunning the install, I validated the env.production file is good and normal. I have 4gb of ram, the DNS is working because the cert was generated, and the 301 means it’s getting to the server.

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

alexdo
Site Moderator
Site Moderator badge
December 17, 2022

Hello @kylek123

I believe that you’ve modified the question and removed all the sensitive information (IPs and domain names).

Was the initial deployment successful? I’ve seen this case when an HTTP to HTTPS redirection is set in place, is your domain name not resolving and can you check if the 301 is redirecting to an external source?

Regards

can whatever mod is reviewing my previous post please deny both that one and this one? I accidentally put my url in it

Ok so I looked at the nginx config and it has this config:

  listen 80;
  listen [::]:80;
  server_name social.korth.me;
  root /home/mastodon/live/public;
  location /.well-known/acme-challenge/ { allow all; }
  # location / { return 301 https://$host$request_uri; }
}

Looks like it’s catching the port 80 for some reason from NGINX despite using SSL. changing the redirect to the following redirects to google.

  location / { return 301 https://www.google.com; }

Now to figure out why Nginx isn’t seeing port 443 being used

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up