Deploy Ghost Multilingual Nginx Proxy

Nginx proxy for multi-language Ghost blogs with subdirectory routing

Deploy Ghost Multilingual Nginx Proxy

Ghost Nginx Proxy

bePublish/ghost-multilingual-reverse-proxy

Just deployed

Deploy and Host Ghost Multilingual Reverse Proxy on Railway

A Dockerized Nginx reverse proxy template, optimized for Railway. It allows you to host multiple Ghost CMS instances under a single domain, routing traffic to different blogs based on URL subdirectories (e.g., /en, /fr). It's a cost-effective solution for managing multilingual sites or multiple publications.

About Hosting Ghost Multilingual Reverse Proxy

Hosting the Ghost Multilingual Reverse Proxy on Railway is straightforward. The process involves deploying this template, which sets up an Nginx server inside a Docker container. You then configure a few environment variables to link the proxy to your separate Ghost CMS instances, which should also be hosted on Railway.

The critical configuration step is ensuring each Ghost instance's public url variable matches the final domain structure (e.g., https://your-domain.com/fr/). The proxy then intelligently routes incoming traffic to the correct Ghost service based on the URL path, making all your blogs accessible from one domain.

Common Use Cases

  • Multilingual Blogs: Serve different language versions of your Ghost blog from subdirectories (e.g., /en/, /fr/, /es/).
  • Multiple Brands or Publications: Manage several distinct publications or brands under a single parent domain.
  • Integrated Documentation: Host your main blog and a separate documentation site (e.g., GitBook, Docusaurus) from the same domain.

Dependencies for Ghost Multilingual Reverse Proxy Hosting

  • Docker: The proxy is containerized using Docker.
  • Nginx: The core of the reverse proxy.
  • Ghost CMS Instances: At least one running Ghost blog service is required to proxy traffic to.

Deployment Dependencies

Implementation Details

The core logic of the reverse proxy is handled by the nginx.conf.template file, which uses environment variables to dynamically generate the final Nginx configuration. The map directive is used to route requests to the correct Ghost instance based on the URL path.

# nginx.conf.template

# ... (server configuration)

location ~ ^/(?.*) {
    # ... (proxy headers)
    proxy_pass $GHOST_ROOT_URL/$ghost_path$is_args$args;
}

# ... (additional locations for other instances)

Why Deploy Ghost Multilingual Reverse Proxy on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Ghost Multilingual Reverse Proxy on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
caring-vibrancy
Deploy and Host caring-vibrancy with Railway

View Template
mellow-vue
A full-stack Vue app with The Boring JavaScript Stack.

View Template
Openfront
Deploy and Host Openfront with Railway