nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

Official Documentation On Wordpress Config

Open Fatman2142 opened this issue 1 year ago • 2 comments

Hi Guys,

I have found tons on the internet around Nginx and Wordpress but nothing on Nginx Proxy Manager and Wordpress. Have been troubleshooting my install for a few weeks with no success.

Would it be possible for the official documentation on how to route WordPress sites?

Very least it will help with preventing bug reports for those who don't realize all the things they need to do.

Thanks!

Fatman2142 avatar Jun 19 '24 20:06 Fatman2142

Did you find a solution? I was stuck on this for two days, but I finally figured it out. Maybe I can help you.

remylavergne avatar Jun 20 '24 20:06 remylavergne

I agree to @Fatman2142 and would love to see such an official documentation on 'docker, wordpress and with nginx-proxy-manager'

The same in https://github.com/NginxProxyManager/nginx-proxy-manager/issues/400 A lot of hints, examples, but most of them about 1-4 years old. Nothing worked for me... I'm getting '502 Bad Gateway', WP over http:// is running fine.

thessy avatar Aug 15 '24 14:08 thessy

I tried to set up nginx-proxy-manager for my WordPress site but the web page is responding a 502 bad gateway error. Here are some Screenshot. I just can't make it work. Can anyone help me please ? image

I tried different things image

and different ssl settings image

RemyDG0 avatar Sep 14 '24 15:09 RemyDG0

@RemyDG0 do you still have the problem ?

remylavergne avatar Sep 17 '24 19:09 remylavergne

@remylavergne Yes, I still do have this issue. My problem is I don't really know where to look, all tutorials I saw only talked about command lines or files edit, it is just like if the web gui does not exists. Then I am not really sure how to access those.

RemyDG0 avatar Sep 17 '24 19:09 RemyDG0

I can maybe help you if you have same "config" as mine :

  • using a VPS
  • nginx proxy manager deployed with docker
  • wordpress deployed with docker

Let me know.

remylavergne avatar Sep 17 '24 20:09 remylavergne

@remylavergne Did you mean a VPN instead of VPS ? I don't use either. I use both packages as docker images but the docker host is TrueNas scale and they customised it a little. Does the configuration need to be done outside of of the Web user interface ?

RemyDG0 avatar Sep 18 '24 08:09 RemyDG0

I don't have expertise with TrueNAS sorry :/

remylavergne avatar Sep 18 '24 18:09 remylavergne

I don't have expertise with TrueNAS sorry :/

I found how to access the console, the docker image and web gui are the same, my question if settings for setting up Wordpress are only available in the console

RemyDG0 avatar Sep 18 '24 18:09 RemyDG0

My NPM config : image The hostname / ip should point to the Wordpress container.

In Wordpress you should add the domain in configuration : image

Don't forget to add your wordpress container in the same network as NPM (my biggest mistake) :

networks:
  proxy_manager_default:
    external: true

The docker ps output : image

I assume that your TrueNAS runs inside a private network, so don't forget to open internet box ports, and your domain should CNAME / A RECORD to your server IP : image

remylavergne avatar Sep 18 '24 18:09 remylavergne

Thank you so much for your config @remylavergne, I now understand what was not working for me ! It now works !! My mistake was basically to select https instead of http for the scheme in the Edit Proxy Host window. It mislead me making me think that it was necessary in order to use ssl.

RemyDG0 avatar Sep 18 '24 20:09 RemyDG0

@RemyDG0 Perfect 😎

remylavergne avatar Sep 19 '24 07:09 remylavergne

I have had a working wordpress install

it no longer works correctly behined NPM

I am getting this error:

Bad Request
Your browser sent a request that this server could not understand.

Apache/2.4.62 (Debian) Server at 10.0.16.18 Port 80

Initially i thought this was a corruption issue with my wordpress install, however i have hit exactly the same issue with a brandnew install

I have used the following custom location settings for /

proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

i have nothing set in the advanced tab of the server defintion

its not cookies - this happens in a fresh incognito window

any ideas?

for my fresh install with the same issue this is the compose

services:

  wordpress:
    image: wordpress
    ports:
      - 8180:80
    deploy:
       mode: replicated
       replicas: 1
       restart_policy:
         condition: on-failure
         delay: 5s
         max_attempts: 3
         window: 120s
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: redacted
      WORDPRESS_DB_PASSWORD: redacted
      WORDPRESS_DB_NAME: wordpressdb
      WORDPRESS_HOSTNAME: mydomain.com
      WORDPRESS_CONFIG_EXTRA: |
        /* Multisite */
        define('WP_ALLOW_MULTISITE', true );
        define('MULTISITE', true);
        define('SUBDOMAIN_INSTALL', true);
        define('DOMAIN_CURRENT_SITE', 'mydomain.com'); 
        define('PATH_CURRENT_SITE', '/');
        define('SITE_ID_CURRENT_SITE', 1);
        define('BLOG_ID_CURRENT_SITE', 1);
        
        /* Alternate CRON for backup plugin */
        define( 'ALTERNATE_WP_CRON', true );

    volumes:
      - html:/var/www/html
    extra_hosts:
     - mydomain.com:my-external-ip

  db:
    image: mysql:8.0
    environment:
      MYSQL_ROOT_PASSWORD: redacted
      MYSQL_DATABASE: wordpressdb
      MYSQL_USER: redacted
      MYSQL_PASSWORD: redacted
    deploy:
       mode: replicated
       replicas: 1
       restart_policy:
         condition: on-failure
         delay: 5s
         max_attempts: 3
         window: 120s
    volumes:
      - db:/var/lib/mysql

volumes:
  html:
    driver: local
    driver_opts:
      type: none
      device: "/mnt/docker-cephFS/wordpress_html"
      o: bind
  db:
    driver: local
    driver_opts:
      type: none
      device: "/mnt/docker-cephFS/wordpress_db"
      o: bind

scyto avatar Apr 14 '25 19:04 scyto

Issue is now considered stale. If you want to keep it open, please comment :+1:

github-actions[bot] avatar Oct 27 '25 02:10 github-actions[bot]