haproxy with wordpress

Started by awptechnologies, June 18, 2023, 01:10:07 AM

Previous topic - Next topic
I have tried so many configurations to enable haproxy in wordpress to use my lets encrypt certs. Can someone please help me out with a configuration that works. I have enabled ssl true in wp-config.php and i can get the website url to work but i cant get the admin pages to work under my hostname used with haproxy. Just basic config that allows access to website and the admin pages through haproxy would be greatly appreciated.

I do not use HAproxy, but nginx instead. When you are getting 404 errors on your admin site, but the main page is working, this fixed it for me:

Quotelocation / {
                # This is cool because no php is touched for static content.
                # include the "?$args" part so non-default permalinks doesn't break when using query string
                try_files $uri $uri/ /index.php?$is_args$args =404;
    }


    if (!-e $request_filename) {
            rewrite ^.*$ /index.php last;
    }

and have you seen this thread?:
https://forum.opnsense.org/index.php?topic=23339.0
Deciso DEC850v2

is there anyway you can break down your config. i installed nginx but have no idea how to setup. can i use haproxy for local services and then nginx for website? or do i have to switch everything to nginx?

I never tried to use them both or installed them together. I installed nginx with the help of this thread:
https://forum.opnsense.org/index.php?topic=19305.0
Deciso DEC850v2