Serve Discourse from a subfolder (path prefix) instead of a subdomain

Sorry, I was referencing to a setup like this:

Container config web_only.yml:

templates:
# […]
  - "templates/web.socketed.template.yml"
# […]
#expose:
#  - "80:80"   # http
#  - "443:443" # https

External nginx-site.conf:

server {
    listen 443 ssl default_server;
# […]
    location ~ ^/forum {
        proxy_pass http://unix:/path-to-discourse/discourse/shared/web-only/nginx.http.sock:;
        proxy_set_header Host $http_host;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Accept-Encoding $http_accept_encoding;
    }
# […]
}
2 Likes