Skip to content

How to run wordpress behind HOST nginx? #251

@skupfer

Description

@skupfer

Hello there,

how do I have to configure nginx to be able to run a dockerized wordpress setup? No, I do not intend to run a dockerized nginx and need/want it to be managed by my host.

I tried the following but I cannot get past the language setup

server {
    listen 80;
    server_name 10.211.55.14;

    rewrite ^(.*) https://$server_name$1 permanent;
}

server {
    listen 443 ssl;
    server_name 10.211.55.14;

    access_log /var/log/nginx/wordpress-access.log;
    error_log /var/log/nginx/wordpress-error.log;

    include /etc/nginx/snippets/ssl-wordpress.conf;
    include /etc/nginx/snippets/ssl-params.conf;

    location / {
        proxy_pass       http://localhost:7979;
        proxy_redirect   off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $server_name;
        proxy_set_header X-Forwarded-Proto https;
    }
}

For /wp-admin I receive "ERR_TOO_MANY_REDIRECTS" and for the front page css won't get loaded properly

I already added the following to wp-config.php

define('WP_HOME','http://10.211.55.14');
define('WP_SITEURL','http://10.211.55.14');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions