Skip to content

Nginx Reverse Proxy Doc #609

Closed
Closed
@Klynk

Description

@Klynk

Hello,

I found a confiuration to easily use nginx as reverse proxy for ssl, maybe this can reduce search time for others.
Thought I would put it here and maybe you can add it to the docs:
This method does not require any modification of the wordpress docker image as well.

server {
    listen 443 ssl http2 default_server;
    listen [::]:443 ssl http2 default_server;

    server_name my-site.com; <-- important

    ( ... )

    location / {
        proxy_set_header Host $server_name; <-- important
        proxy_set_header X-Forwarded-Proto https; <-- important
        proxy_pass http://my-wordpress-container; <-- important
    }
}

This was tested using the swag docker image:
https://hub.docker.com/r/linuxserver/swag

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions