Hi.
On 22.02.21 01:31, Igor Cicimov wrote:
But if I do some configuration tweaks in "wp-config.php", like adding the
following two lines :
define('WP_HOME', 'https://front1.domain.local
<https://front1.domain.local>');
define('WP_SITEURL', 'https://front1.domain.local
<https://front1.domain.local>');
It seems to work correctly.
It is not an acceptable solution however, as these WP instances will be
managed by people who are not really tech-savvy.
So I wonder if HAProxy could provide a setup with all the required modifications,
rewritings, ... allowing both worlds to coexist in a transparent way :
- usable WP site while browsing the "real" URLs from the backend
- usable WP site while browsing through HAProxy.
Right now WP is my concern, but I am sure this is a reusable "pattern" for
future needs.
Regards
This is a requirement for most apps behind a reverse proxy -- you simply have to
tell the app that it is behind a reverse proxy so it can set correct links where needed.
In your case if you google for "wordpress behind reverse proxy" I'm sure you'll
get a ton of resources that can point you in the right direction for your use
case like using X-FORWARD headers for example or whatever suits you.
Full Ack to Igor's statment.
A a further Idea maybe you can replace the response.
http://cbonte.github.io/haproxy-dconv/2.3/configuration.html#4.2-http-response%20replace-header
http://cbonte.github.io/haproxy-dconv/2.3/configuration.html#4.2-http-response%20replace-value
It could be tricky for a huge amount of hosts, due to this fact I suggest to
setup WP with WP_HOME and WP_SITEURL which is possible via wp-admin via GUI :-)
You can also create a smal setup tool which adds the values to the wp_config and
add the haproxy map entry for the domain.
Regards
Alex
Vote for us <https://www.research.net/r/bbapartners2021>as RegTech Partner of
the Year at the British Bank Awards!
Know Your Customer due diligence on demand, powered by intelligent process
automation
Blogs <https://www.encompasscorporation.com/blog/> | LinkedIn
<https://www.linkedin.com/company/encompass-corporation/> | Twitter
<https://twitter.com/EncompassCorp>
Encompass Corporation UK Ltd | Company No. SC493055 | Address: Level 3, 33
Bothwell Street, Glasgow, UK, G2 6NL
Encompass Corporation Pty Ltd | ACN 140 556 896 | Address: Level 10, 117
Clarence Street, Sydney, New South Wales, 2000
This email and any attachments is intended only for the use of the individual
or entity named above and may contain confidential information.
If you are not the intended recipient, any dissemination, distribution or
copying of this email is prohibited.
If received in error, please notify us immediately by return email and destroy
the original message.