haproxy problem accessing wp-admin
-
I am using an external IP address via [ redundant link deleted ] which directs traffic to a server I’m running haproxy on. This works just fine to access the wordpress site landing page (main page) via public URL FQDN (Example:
https://wp.mywordpress.com), but any other pages it redirects it to the site/home URL which is the internal IP address of the site (Example:http://192.168.1.1). This works fine for me on my home network of course, but I cannot access anything via the public URL. If I change the site/home URL to the external FQDN, then it stops working. There is obviously a setting I need somewhere in WordPress, but I’ve tried using a rewrite with .htaccess, setting the home/site URL to the external address, and it doesn’t work.
Help or pointers would be very much appreciated!
My haproxy setup is very simple:########################## FRONTENDS ##########################
frontend webservers
bind :80
bind *:443 ssl crt /etc/letsencrypt/live/mywordpress.com/fullcert.pem
redirect scheme https code 301 if !{ ssl_fc }
mode http
# wp.mywordpress.com
acl host_wp.mywordpress.com hdr(host) -i wp.mywordpress.com
use_backend wp.mywordpress.com if host_wp.mywordpress.com
########################## BACKENDS ###########################
# wp.mywordpress.com
backend wp.mywordpress.com
server wp.mywordpress.com 192.168.1.1:80 check
(NOTE: The SSL termination on the haproxy works just fine. I get a secure connection, and the certificate is properly used)- This topic was modified 4 months ago by . Reason: formatting fixed
- This topic was modified 4 months ago by .
The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.