Using HA Proxy to direct to Wordpress ran on TrueNAS Scale

Hello everyone,

I have setup a pfSense that runs HA Proxy for other servers.

I’ve setup TrueNAS Scale, with a storage pool and Wordpress as an app.

When I direct HA Proxy to the NAS IP and the port used by Wordpress, it does not reach the site. I changed the web GUI default ports to stop HA Proxy taking me to the NAS logon but now it can’t get to the site at all (externally).

Can anyone advise what needs to be done to get HA Proxy to take an external https to the app, within TrueNAS Scale?

Are you able to get to Wordpress directly by ip and port?

If, for example, your Wordpress instance is at http://192.168.1.30:8080, you’d set that in the backend on HAproxy. Then make sure the dns name you’ve set up is being matched by the front end. You want to make sure the dns record is pointing to HAProxy, not to the Wordpress instance directly.

Hello,

No, wordpress is running out of Truenas Scale, using the NAS’ IP and forwarding to a port - which works internally.

Am I checking the NAS or pfSense?

Make sure you can get to the Wordpress site on the TrueNAS via IP:PORT and then make sure the back end of HAProxy is pointed at the same IP:PORT

Hi Tom,

This was one of the videos that I followed.

The only thing that’s different is WP is an app, running on TrueNAS. HA Proxy is pointing to the TrueNAS IP with the WP port.

When I change the IP to a different one, it burst into life. Is there something that needs to be changed to allow HA Proxy to point at TrueNAS apps or could it be something within WP not liking redirected traffic?

Does Wordpress work when you go to TRUENAS_IP:PORT_For_Wordpress?

Internally, happy as anything but anything external - no joy.

The backends point at the ports that work internally but both give the same error ‘503 Service Unavailable’

Hi Tom,

I’ve removed HA Proxy and re-added it, it’s now working :smiley:

Thank you for your time and keep the videos coming, love your content.

All the best,
Tom

I am a little late on this one, but I just wanted to add that I run two public Wordpress websites, one of which is for my wife and her food blog. I run it on a VM in Proxmox, simply because I found the backup and restore process a lot easier than using something like Updraft Plus plugin. I have it set to backup every two hours. My wife is not super experienced with Wordpress and when she makes a mistake, it is a less than 5 minute operation to roll her back to a known working state. Not that doing it with a back up plug in is that hard, but Proxmox is easier and faster IMO. You can probably do something similar with a TrueNAS VM, but I have no experience with that. I run Nextcloud and other software in docker, but Wordpress seems to me to be better off in a VM. Just something to consider.