Running Open edX behind an existing Nginx or web proxy

Routing Open edX through your own Nginx, Apache or load balancer means changing what Tutor's bundled Caddy does for you. This page covers the decisions, setup sequence and checks for doing it safely.

On this page

Why teams run Open edX behind an existing Nginx or web proxy

Tutor can run Open edX behind an existing host-level Nginx, Apache or load balancer once its bundled web proxy is adjusted, so the LMS and Studio are served through infrastructure your team already operates. By doing this, the team takes on the proxy configuration itself: disabling the Caddy container that Tutor ships by default, passing traffic to the right internal port, terminating TLS at the edge and forwarding the headers the platform needs to build correct URLs. Those jobs move from Tutor's defaults to your configuration, and they need to be tested against each hostname you route.

This setup tends to fit organizations that already have a certificate process, a web application firewall or a security standard that requires all public traffic to pass through a controlled edge. It also fits shared edge infrastructure, where one proxy tier serves many applications and operations staff expect new services to follow the same logging, rate limiting and renewal routines. Before committing, confirm who owns the proxy configuration, whether your security team requires specific TLS versions or cipher policies, and whether your WAF rules will inspect Studio and LMS traffic in ways that affect authoring or learner sessions.

The platform itself is AGPL-licensed Django software, and Tutor packages it as Docker containers, so your proxy is sitting in front of several services rather than one application. Check the licence obligations with your legal team as part of planning, and read the Tutor documentation for the current proxy and port settings for your Tutor version, since those details change between releases. Ask your implementation partner to document which hostnames, ports and headers each route depends on before go-live.

Which proxy pattern fits your environment

This pattern leaves Tutor's routing intact. Caddy stays in the stack as the component that receives traffic for every Open edX hostname, and an outer proxy sits in front of it only to terminate TLS for your organization's public certificate. The outer layer forwards requests to the Caddy port on the Tutor host, so the list of hostnames and the routing rules are still defined by Tutor's configuration.

  • Routing: Tutor continues to route the LMS, Studio and micro-frontend hosts. Your proxy passes requests through without splitting paths.
  • Certificate ownership: Your team owns the public certificate on the outer proxy. Caddy's automatic certificate handling must be reviewed so it does not conflict with the outer one.
  • TLS termination: TLS ends at the outer proxy, so traffic between it and Caddy is plain HTTP on the private network unless you add encryption there.
  • Forwarded headers: The outer proxy must set the forwarded protocol and client address headers so Open edX builds correct URLs and logs real client IPs.
  • Operations: Fewest changes to Tutor, so upgrades follow the standard Tutor process.

Before going live, confirm with your Tutor version which ports and certificate settings Caddy expects, and test a redirect loop on the public hostname.

Configuration options and when each fits

This table compares the main ways to place Tutor's web layer behind a host-level proxy or load balancer. Read each row as a decision: what the option changes, the conditions where it fits, and what you take on by choosing it. Confirm every Tutor setting name against the Tutor documentation before you change anything.

OptionWhat it changesWhen it fitsTrade-off
Keep Tutor's default CaddyCaddy handles routing and automatic TLS for the LMS, Studio and other hostnames on the server.The server is dedicated to Open edX, and no other service needs ports 80 or 443.Your outer proxy cannot manage certificates or routing for the site, and two proxy layers are not used.
Disable Caddy and publish its portTutor's web proxy stops binding the public ports, and Caddy's internal port is reachable for your proxy to forward to.An existing Nginx, Apache or load balancer already serves other sites on ports 80 and 443 on the same host.You own every routing rule, redirect and certificate step, and the internal port must not be exposed beyond the proxy.
TLS terminated at the outer proxyCertificates live on the host-level proxy, and traffic from the proxy to Caddy or Tutor may be plain HTTP on a private network.Your organization centralizes certificates, uses a managed certificate store, or has a standard wildcard policy.Internal traffic is unencrypted unless you add encryption between the proxy and the platform, and renewal depends on the outer proxy.
TLS terminated at CaddyThe outer proxy passes TLS traffic through, and Caddy holds the certificates and renews them automatically.You want the Tutor-managed certificate flow and minimal changes to the proxy configuration.Certificate issuance depends on public DNS and reachable ports, and the outer proxy must not alter the TLS handshake.
Forwarded header handlingThe outer proxy sets client address, protocol and host headers, and the platform trusts them only from known proxies.Learners sit behind a load balancer, and logs, rate limits or redirects must show the real client and HTTPS scheme.Misconfigured trust lets clients spoof addresses, and missing headers cause redirect loops or mixed-content errors.
Hostnames routed to the platformEach LMS, Studio and MFE hostname must reach the same backend and keep its original Host header.Several Open edX hostnames share one public address with other applications.Missing a subdomain such as Studio or a plugin host causes silent failures that appear only on certain pages.
HTTP/3 supportClients can use QUIC over UDP on the public edge, which the outer proxy or Caddy must accept and forward correctly.Your edge proxy already runs HTTP/3 and your clients benefit from it.UDP ports must be open at the firewall and load balancer, and the chain must be tested end to end, since support depends on each component.
Confirm before you chooseExact Tutor setting names, port defaults and HTTP/3 behavior for your Tutor release.Before any change to a staging or production host.Settings differ between Tutor releases, so check the Tutor documentation for your version.

How a learner request reaches the LMS through your proxy

The request starts at the learner's browser, resolves through DNS to your host-level Nginx, Apache or load balancer, and that proxy terminates TLS. It then forwards plain HTTP to the Tutor-managed proxy port, which routes to the LMS or Studio container. Check two hand-offs closely: the forwarded headers set at the outer proxy, which the LMS relies on to know the original scheme and host, and the boundary where traffic enters the Tutor network. Confirm the data stores are reachable only from inside that network.

Request path from learner browser through the outer proxy into the Tutor network.

Setup sequence for an external proxy in front of Tutor

This sequence moves Tutor's public entry point from its bundled proxy to your existing Nginx, Apache or load balancer, so that every Open edX hostname resolves, terminates TLS and reaches the platform with the headers it expects. Each step closes with a check that tells you whether the next one can start.

  1. Inventory every public hostname

    Before changing anything, list each hostname the platform will answer: the LMS, Studio, any micro-frontend subdomains and any plugin or preview hosts your configuration defines. Compare this list with the domain values in your Tutor configuration file and with the DNS records your team controls. Your network or platform engineer owns this list, and the output is a written table of hostname, purpose and owner. Check it by confirming that every name in the table appears in the Tutor configuration and resolves to the address of your outer proxy in your DNS zone.

  2. Decide where TLS terminates

    Choose whether certificates are installed on your outer Nginx, Apache or load balancer, or whether traffic reaches Tutor's proxy over HTTPS and Caddy manages certificates. Your security and platform leads should make this call together, because it sets who renews certificates, which headers the upstream trusts and where certificate private keys are stored. Record the decision with its owner and renewal process. Check it by confirming that one named team can show the certificate expiry date for every hostname in the inventory.

  3. Adjust Tutor's web proxy and published port

    Using the Tutor documentation for the version you run, change the settings that control Tutor's bundled web proxy so it no longer claims ports 80 and 443 on the host, and set the port or interface it publishes for your outer proxy to reach. Apply the change through Tutor's configuration and plugin mechanisms rather than editing generated files by hand, then regenerate the configuration. Check it by confirming with the container engine that the proxy service publishes only the intended address and port, and that nothing else on the host is bound to 80 or 443.

  4. Configure forwarded host and protocol headers

    Edit the outer proxy so each virtual host sends the original Host header, the client address and the scheme (http or https) to the upstream Tutor port. Set one virtual host per hostname from step one, and make sure every block points to the same upstream unless you deliberately split services. Your web or infrastructure engineer owns this change. Check it by sending a test request to each hostname and confirming through the platform's access logs that the Host value and scheme match the public name and protocol used.

  5. Validate LMS and Studio responses

    Load the LMS home page, a course page, the Studio login page and an authenticated Studio page from a browser on a network outside your office. Confirm that pages render with assets loaded over HTTPS, that redirects keep the public hostname and that no mixed content warnings appear in the browser console. Your QA or platform engineer runs these checks and records results against the hostname table. Check it by confirming each page returns the expected status code, with no redirect loop and no references to internal addresses or ports in the HTML.

  6. Test login and registration flows

    Run a full learner registration, email confirmation, sign-in and sign-out on the LMS, then a staff sign-in to Studio. If you use an external identity provider, start its sign-in from the LMS and complete the round trip, because callback URLs depend on the public hostname and scheme. Your identity and application owners sign off on the results. Check it by confirming that each login returns the user to the correct hostname with a session cookie marked secure, and that the identity provider accepted the callback without error.

  7. Retest after a full restart

    Restart the Tutor stack and the outer proxy in the order your runbook defines, then repeat the hostname, certificate, header and login checks. Also confirm that the outer proxy starts cleanly when the upstream is briefly unavailable, and that certificate renewal still works against the new setup. Record the restart procedure in your operations runbook. Check it by confirming that every check from the earlier steps passes after the restart, and that the runbook lists who runs the restart and how a rollback is performed.

Security risks when the proxy is yours to maintain

Once a host-level proxy sits in front of Tutor's stack, the proxy becomes part of the platform's security boundary. The cards below cover the risks that most often appear after go-live, and the checks that keep TLS, identity, logs and routing trustworthy over time.

Certificate renewal and key custody

The outer proxy now holds the TLS certificate and private key for every hostname that learners and staff use. If renewal is handled by a cron job nobody watches, the certificate can expire silently and sign-in breaks for everyone at once. Confirm who owns renewal, where the private key is stored and who can read it, and test a renewal in staging before the first expiry date arrives. Decide whether certificates are issued by an ACME client on the proxy or by your internal certificate authority.

Tutor docs

Trusting forwarded headers only from known proxies

Open edX builds its idea of the request scheme and client address from headers the proxy sets, such as X-Forwarded-For and X-Forwarded-Proto. If the application accepts those headers from any source, a client can spoof its address or claim HTTPS when it is not. Restrict trusted sources to the proxy's own address, strip any client-supplied forwarding headers at the edge, and verify the values the application sees on a test request.

Studio exposed on an unintended hostname

Studio is the authoring interface and should not be reachable from the learner hostname or from any name that is not intended for course teams. A wildcard server block or a default catch-all route can send Studio traffic to the public LMS vhost or expose the CMS host to the internet. Write explicit server names for each hostname, restrict Studio to the staff network or an identity-aware gateway where your policy requires it, and test each name from outside the network.

Rate limits and WAF rules that break sign-in

Rate limiting and web application firewall rules tuned for generic websites often block legitimate Open edX traffic. Login and SSO callback flows, the instructor dashboard, and xAPI statement posts from the platform can all look like bursts or suspicious payloads to a generic rule set. Add rules in logging mode first, review which requests they match, and create narrow exceptions for internal callers instead of disabling a rule for the whole host.

Logging real client addresses

If the proxy logs only its own address, rate limits, audit reviews and incident investigations lose the client source. Configure the proxy log format to record the original client address and the forwarded protocol, and confirm that the application log records the same client address after the proxy hop. Keep proxy logs for the period your security policy sets, and make sure someone can correlate a learner request across both sets of logs.

Keeping proxy configuration under version control

A hand-edited proxy configuration on a single server is hard to review, hard to reproduce after a rebuild and easy to drift from what Tutor expects. Store every server block, include file, certificate path and header rule in a Git repository, require review for changes, and deploy from the repository. Record which proxy configuration matched each Tutor release so that an upgrade does not leave a stale header rule or port mapping in place.

Questions teams ask before running Open edX behind their own proxy

What drives the cost of putting Open edX behind an existing Nginx or web proxy?

The main cost drivers are the number of proxies and load balancers in the request path, how many hostnames must be routed, how much of the current proxy setup is already automated, and how long the security review takes. A single host with one Nginx instance and clear ownership is a small change. A chain with a corporate load balancer, a WAF, a separate TLS terminator and several internal teams who approve changes is a larger one. Costs split between one-time design and testing work and any recurring upkeep of the proxy configuration after go-live. Ask any partner to price the work from a written list of proxies, hostnames and environments, and to state which items are one-time and which recur.

How long does a proxy change for Open edX usually take?

The duration depends on the environment more than on the Open edX configuration itself. Timing is shaped by how quickly DNS records can be created, how long certificate issuance and renewal take inside your organization, how many change windows the network and security teams require, and whether a staging host exists to test against first. Teams with an existing staging path and documented proxy automation can move faster than teams that must build both. Confirm these dependencies with your own network, security and DNS owners before setting a target date, and agree the schedule in writing with any implementation partner.

What must our team provide before the work starts?

Plan to provide these items before the engagement begins:

  • DNS access or a named owner who can create the LMS, Studio and any MFE or plugin hostnames
  • A certificate process, including who issues certificates and how renewals are handled behind the proxy
  • Network changes, such as firewall rules between the proxy and the Tutor host, and access to the load balancer configuration
  • A staging host that matches production closely enough to test forwarded headers, redirects and HTTP/3 behavior

Without these, the work stalls at the points where configuration must be verified in your real environment.

Can our internal team set up Open edX behind our proxy without a partner?

Yes, a team with Linux, Docker and proxy experience can do this, provided it has time to test and someone accepts ownership of the result. The work involves disabling Tutor's bundled web proxy, pointing your Nginx, Apache or load balancer at the right ports, passing TLS and forwarded headers correctly and routing every hostname the platform uses. The risk is usually not the first working page but the edge cases that appear later, such as mixed content, redirect loops or misrouted subdomains. Consider a partner when no one on the team has done this before, when the security review is strict, or when the change must be finished within a fixed window.

Which hostnames and routes must the proxy handle for Open edX?

Every public hostname the Tutor installation serves must be routed to the correct backend, and the list usually includes the LMS host, Studio, any micro-frontend subdomains and any plugin hosts you add. Confirm the exact hostnames your Tutor version generates in your environment, because they depend on your configured domain and enabled plugins. Check each route with a request from outside your network, and verify that the proxy forwards the original host header so the platform builds correct links.

What breaks most often when Open edX sits behind a proxy?

The most common failures are missing or incorrect forwarded headers, which cause wrong scheme or host values in generated URLs, redirect loops after login, and mixed content warnings when assets load over plain HTTP. TLS termination mistakes are next, especially when the proxy and Tutor disagree about which side handles HTTPS, and certificate renewals that fail silently behind a second proxy. Misconfigured timeouts can also break long requests and file uploads. Test login, course pages, Studio, file uploads and certificate downloads after every proxy change, not only the home page.

What should a security review of the proxy layer cover?

A security review should confirm that TLS is terminated with approved protocols and certificates, that only the intended ports and hostnames are exposed, that forwarded headers cannot be spoofed by clients, and that proxy access logs are retained and reachable by your security team. It should also check that Tutor's internal services are not reachable directly from the network and that changes to the proxy configuration go through your normal review process. Ask your security team which control families and internal standards apply, since their requirements decide how much evidence the review needs.

Who owns the proxy layer after go-live

The outer proxy is a separate change surface from Tutor, so someone must own its configuration from go-live onward. Tutor manages the containers, the Open edX services and their internal routing, but the Nginx, Apache or load balancer in front of them belongs to whichever team runs your edge. Before go-live, record who edits that proxy, who approves changes, and which Tutor settings it depends on, including whether Tutor's own web proxy is disabled, which port the upstream listens on, and which hostnames are routed to it. Those assumptions are what break during an upgrade, so they belong in the runbook next to the Tutor version you are running.

Each Tutor upgrade should start with a review of the port and routing assumptions, not only the Open edX release notes. Confirm in the Tutor documentation for your target version whether the internal ports, the proxy-facing service names, the forwarded header expectations or the list of hostnames for Studio, the LMS and any micro-frontends have changed. Keep the proxy configuration in version control with the Tutor configuration so that a change to one is visible beside the other. Test the upgrade on a staging copy of both layers, because a working platform behind a misrouted proxy will still produce user-facing failures that look like application bugs.

Test certificate renewal and failover as scheduled exercises, not as emergencies. If your proxy issues or renews certificates, check that the renewal hook can reach the challenge path for every hostname and that a failed renewal raises an alert with an owner. If you run a second proxy or load balancer, rehearse switching traffic and confirm that the upstream Tutor host answers correctly to both. Add the outer proxy to backup and incident runbooks: back up its configuration and certificates, record how to restore it, and state in the incident procedure whether the first check is the proxy or the platform. Ask your Tutor support provider or the Tutor documentation which parts of the stack must be restored together.

How DeployOpen works on this

DeployOpen plans and delivers the proxy layer around Open edX as a defined piece of work inside your infrastructure. We start from your existing Nginx, Apache or load balancer, agree the routing and TLS design in writing, and deliver a working Tutor configuration with the evidence your operations and security teams need to review it.

How we scope

  • Inventory the existing proxy, load balancer, TLS termination point and the hostnames that must route to Open edX
  • Confirm whether Tutor's bundled Caddy is disabled or kept, and which ports the host-level proxy will own
  • Agree in writing which forwarded headers, HTTP/3 settings and certificate handling are in scope before build starts

How we build

  • Configure Tutor to run without its web proxy and wire the host-level Nginx, Apache or load balancer to the agreed upstream
  • Set forwarded headers and the platform's trusted proxy settings, then test LMS, Studio and every MFE hostname end to end
  • Verify HTTP/3 behavior against your proxy version and document any fallback to HTTP/1.1 or HTTP/2

How we hand over

  • Deliver proxy configuration files, Tutor settings and a routing map covering each hostname and its upstream target
  • Provide a test script and runbook so your team can repeat checks after certificate renewals or proxy upgrades
  • Document the change procedure for adding hostnames, rotating certificates and rolling back the proxy configuration

How we support

  • Support is available as a retainer for proxy changes, Open edX upgrades and certificate renewals after handover
  • Retesting of routing and headers can be included when the proxy, Tutor version or hostnames change
  • Ask for the support scope, response expectations and change process to be written into the quote before work begins

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.