Thanks for your help, @BlackDex.
I found an Nginx config where I’d added a custom line to address an issue I was having with another site. The issue was no longer a problem, so I removed the problematic config.
Nginx then wouldn’t restart due to a duplicate vaultwarden-upstream
line in my Vaultwarden configuration (I have no idea why that was suddenly a problem; I hadn’t touched that config). I removed the duplicate reference and hey presto, everything is now working as it should… including creating accounts and changing passwords!
Thanks again for your help with this!