My mastodon is working just fine on https://orng.social however, whenever I visit a new browser and enter orng.social (http://orng.social) then it returns a binary of 57bytes I have tried redirects in many ways but nothing is working! any clue where to start investigating?
using stock nginx configuration as provided at github with hostname set correctly to orng.social in both blocks.
However, due to enforced HSTS, this can only be seen if you are using a browser for the first time (or in incognito) but once the site is opened with https everything works fine.
#1: removed the HTTP redirect block from mastodon’s config file. #2: removed http2 from the other server block that was handling another website’s redirect #3: merged mastodon’t redirect into a common block by adding orng.social as a domain in other server block #4: Removed the root /home/mastodon/live/public; line from the https block!
Then reloaded nginx and everything seems stable and working.
The root is supposed to point to the public directory inside the cloned Mastodon repository, wherever it may be. The documentation assumes the user is called mastodon and the repository has been cloned into the folder named live.
nah, It was the http2 added to another server’s redirect block.
What I’ve understood so far is that the location / return 301 https://$host$request_uri; can work without a root being specified, also, the HTTPS requests are being proxied to docker anyway so a root isn’t required there either (confirmed, I amended the root to point to exact folder at /root/mastodon/public but that didn’t solve anything to me). So I’d blame it to the redirect block for my other app having http2 added to the port 80 server blocks because that was the only thing I hadn’t noticed or removed earlier.