Follow an incoming request

A reader opens a public HTTPS URL. At the hosting end, a web server receives the request. An ASP.NET Core app can use Kestrel directly. Another common arrangement puts a reverse proxy in front. The proxy accepts the public connection and passes the request to the application. It can also handle TLS, the encryption used by HTTPS.

IIS on Windows supports two arrangements. The application can run inside the IIS worker process, or IIS can forward to Kestrel in a separate process. Knowing which one is in use helps explain why a front-end error page can appear before the weblog has even seen a request.

Microsoft on Kestrel and reverse proxies IIS hosting models

Give each directory a job

Application
The release contains the code and templates that make the pages. Treat it as replaceable. Keep a copy of any local theme changes alongside the material needed to reproduce them.
Content and uploads
These change whenever someone publishes. The running application needs appropriate write access here. In a container, mount persistent storage for this material so that replacing the container preserves the entries. Docker on persistent volumes
Private settings
Keep application secrets and private backups outside publicly served directories. Keep an inventory of what the application needs to start and which settings differ between a test host and the public one.

Test from the reader’s end

The network name and scheme visible to the reader matter. If a proxy accepts HTTPS and the app sees an internal HTTP connection, configure the supported forwarded settings for the trusted proxy. Then check a page link, a feed link and a redirect as a visitor would see them. They should lead back to the public host.

Microsoft on forwarded headers