Jeremy Davis's picture

I've never used Nginx proxy manager but would expect that it would "just work" as confirmed working config (see below) is fairly minimalist vanilla Nginx reverse proxy config - without anything special.

Regardless, if you could actually share the Nginx config that it has generated for you, perhaps I can see what has gone wrong (and you can report upstream to Nginx proxy manager devs)?

FYI, to test, I launched a vanilla v17.1 WordPress appliance and a v17.1 Nginx appliance. Other than running through the firstboot scripts, I changed nothing on WP.

On Nginx, I disabled the 'tkl-default' site ('rm /etc/nginx/sites-enabled/tkl-default') and created a new config file (/etc/nginx/sites-available/wp-rev-proxy) as below (note this doesn't support IPv6 - let me know if you need IPv6 and I can include that too):

server {
    listen 80 default_server;

    # SSL configuration
    listen 443 ssl default_server;
    include snippets/ssl.conf;
    server_name wp.jeremydavis.org; # change this to your domain

    add_header Cache-Control public;

    location / {
        proxy_pass https://192.168.1.121; # change this to your wp server
        proxy_ssl_verify off;
        proxy_redirect off;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;
    }
}

After adding that, I enabled it ('ln -s /etc/nginx/sites-available/wp-rev-proxy /etc/nginx/sites-enabled/wp-rev-proxy'), restarted Nginx ('systemctl restart nginx') and it "just works" for me!?

Note that whilst the config above works, it could be improved (it's pretty basic and minimalist).

I can only assume that Nginx proxy manager is doing something weird? I'm assuming that there must be some way to match the options in my config? And/or perhaps you can do some sort of site config manual override?

Good luck and please let me know how you go.