T
T
Tech2019-05-30 11:29:38
linux
Tech, 2019-05-30 11:29:38

Crooked Wordpress and Haproxy reverse proxy?

There is a configured haproxy. It terminates the https certificates on itself, after which a simple http goes to the locale to the web server. All sites on different engines work well. Installed on this web server wordpress.
When accessing it, there are no styles. Naked html. Like this:
5cef93f36d5e1946708278.png
The login to the admin panel is also displayed, while driving in authorization data, there is no login and you are prompted to enter the login and password again.
If you direct traffic, bypassing haproxy, directly to the web server, then the site is displayed correctly and the login to the admin panel is successful.
Where to dig?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
O. J, 2019-05-30
@bioid

wp loads styles by full path, not relative. Therefore, you are given html in which all assets are connected via http. Set the site settings to https and reset the cache on the server if any.

I
Igor Vorotnev, 2019-05-30
@HeadOnFire

If I understood the task correctly, then on the Apache / Nginx server with WP itself that listens on port 80, I would catch requests from https:// to the url and rewrite them to http://. But frankly, xs, I'm not sure that WP will agree to such a scheme. I have a similar connection with CloudFlare, but the traffic between CF and my server is also https, so there are no problems. I experimented with haproxy, but never worked in production, so I did not encounter such a problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question