ElkArte Community

Project Support => Support => Topic started by: sergiodadi on March 22, 2023, 04:33:37 am

Title: ElkArte and HaProxy
Post by: sergiodadi on March 22, 2023, 04:33:37 am
Hello,

this information may be useful:

I tried to use ElkArte with HaProxy (https://www.haproxy.org) (it is a reverse proxy) but I had weird display:angry:

Searching the smf forum, I found the information:

  • In "Settings.php", change $boardurl to '' (WARNING! This cannot be done using the web GUI because it will default to 'http://' and break your forum!!)
  • Update the MySQL 'settings' table and change all URLs from absolute to relative
  • Update the MySQL 'themes' table and change all URLs from absolute to relative

To fix my forum I used the following queries:

UPDATE settings SET value=REPLACE(value,'http://forum.domain.tld','') WHERE value LIKE 'http://forum.domain.tld%';
UPDATE themes  SET value=REPLACE(value,'http://forum.domain.tld,'') WHERE value LIKE 'http://forum.domain.tld%';

and the display is OK now:thumbsup:

Title: Re: ElkArte and HaProxy
Post by: Spuds on March 22, 2023, 09:58:35 am
Cool .... Thank you for sharing this
Title: Re: ElkArte and HaProxy
Post by: ahrasis on March 23, 2023, 09:42:04 pm
I normally use repair_settings.php for that.
Title: Re: ElkArte and HaProxy
Post by: ' Tzs , on April 02, 2023, 04:55:15 pm
Does the repair_setting you wrote for SMF also work for Elkarte?
Title: Re: ElkArte and HaProxy
Post by: Burke Knight on April 02, 2023, 05:29:59 pm
Here's the one I have for ElkArte.
Title: Re: ElkArte and HaProxy
Post by: Spuds on April 02, 2023, 09:16:09 pm
I try to update that from time to time ..... check https://github.com/elkarte/tools to see if there is an update