How to set up a Wordpress site with Nginx Proxy Manager and Portainer.:

Wordpress is an extremely popular CMS (Content management system) service that is used by at least 43.5% of all websites in the world. That is a number that is hard to wrap around when you realize how many websites there are in the world. Open-source-Homelab-setup

However, if you have found this site, you are probably facing this issue: Despite setting up everything correctly in Nginx Proxy Manager, your site does not get redirected correctly when entering the domain. You may also sometimes get redirected to example.com:port instead.

How to fix:

Disable apache2
That's correct! Many people aren't aware that the official WordPress Docker image comes with Apache2 pre-installed. The problem is that you're running Apache behind NGINX, which can result in timeouts due to request loops, as the server gets confused about where to fetch resources. To resolve this, you'll need to disable the Apache2 daemon through the console in Docker or Portainer.

How it should look like:

Just run the following in the console of your docker or portainer instance of your wordpress container.

Screenshot_2024-10-01_12-40-42