I have been trying for several days now to get my old Docker stack, on which I ran a Mastodon server, up and running again. I can get it to run, because the individual containers in the stack start up and can communicate with each other.
On my old server (with Plesk), I directed the domain via proxy to a port on the Docker stack, and it ran flawlessly for several years.
When I switched, I copied all Docker volumes to the new server (Virtualmin).
The Virtualmin installation is a Grade A+ system with all features. But it’s just Apache and not Nginx, as was previously the case with Plesk in combination.
That’s the only difference I can see.
After adjusting the configuration hundreds of times using docker-compose down removed and restarting Docker with docker-compose up to see if the changes to the configuration had the desired effect, I am slowly giving up.
I also can’t imagine that Apache as a reverse proxy should be less capable than Nginx and that this could be the cause.
My current status is:
/etc/apache2/sites-available/abc.test.com.conf
ProxyPassReverse / http://127.0.0.1:3000/
ProxyPass / http://127.0.0.1:3000/
RequestHeader set X-Real-IP expr=%{REMOTE_ADDR}
RequestHeader set X-Forwarded-Host abc.test.com
RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} Upgrade [NC]
RewriteRule ^/?(.*) "ws://127.0.0.1:3000/$1" [P]
It is the standard comnpose file from mastodon.
Changed production.rb in
config/environments/production.rb
with added code:
config.hosts = [
IPAddr.new("0.0.0.0/0"), # All IPv4 addresses.
IPAddr.new("::/0"), # All IPv6 addresses.
"localhost" # The localhost reserved domain.
]
But nothing has changed. Whenever I call up the subdomain in the browser, the following error appears in the log output (docker compose up):
web_1 | E, [2025-11-16T16:29:04.355258 #17] ERROR -- : [ActionDispatch::HostAuthorization::DefaultResponseApp] Blocked hosts: 127.0.0.1:3000
web_1 | E, [2025-11-16T16:29:04.645156 #17] ERROR -- : [ActionDispatch::HostAuthorization::DefaultResponseApp] Blocked hosts: 127.0.0.1:3000
web_1 | E, [2025-11-16T16:29:04.663109 #17] ERROR -- : [ActionDispatch::HostAuthorization::DefaultResponseApp] Blocked hosts: 127.0.0.1:3000
This is the last project. Once I finish it, I will have successfully migrated everything from Plesk to Virtalmin.