This change seems to cause problems with https redirects for logins, too – even with use https (force https) checked. After instituting the nginx outer layer with https, I had to:
enable http return URL for Google logins
enable http return URL for GitHub logins
Otherwise you get errors, e.g.
(github) Authentication failure! redirect_uri_mismatch: OmniAuth::Strategies::OAuth2::CallbackError, redirect_uri_mismatch | The redirect_uri MUST match the registered callback URL for this application. | https://developer.github.com/v3/oauth/#redirect-uri-mismatch
These are problems I didn’t have when the site was using Let’s Encrypt inside the container…
@fefrei I am not sure this is needed, because I just rebuilt talk.commonmark.org using the standard web updater. I had two browser windows open:
Home page of site in one window, in anon mode
/admin/upgrade rebuild process going in one window
I mashed f5 like an insane in window #1 and at no point during the rebuild was the site unavailable to me as an anonymous user hitting the homepage. Screenshot proof:
This is in place to serve a message during rebuilding and the following boot-up – web upgrades should always be fine
(It may not be worth it for a stable stock site. I think it’s definitely worth it if you either already have to use a nginx reverse proxy for another reason, or if you rebuild often, e.g. to install or uninstall plugins.)
I agree, as long as this is the only reason for a front-end nginx instance.
If you need to have that for some other reason, you can start with the Create an error page section – the rest is really straightforward. (And if you need to set up a front-end nginx, I think these steps are easier to follow than these instructions.)
Slightly off-topic, but if you use CloudFlare’s DNS you will get an offline page and a cached version of your site provided by them, without even touching your Discourse setup.
I did followed your @fefrei instructions and everything working fine. Thanks to your well documentation . When I stop discourse I’m getting my special error page. But when I’m rebuilding discourse I’m getting the default 404 error page!.