jelastic-jps / wordpress-cluster

Enterprise WordPress Cluster for Auto Scaling, High Performance and High Availability

Home Page:https://jelastic.com/blog/wordpress-cluster-automatic-scaling-cloud-hosting-in-containers/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Server not working reliably after changing document root

benoitchantre opened this issue · comments

I'm trying to use this template with a custom document root.
Instead of using $VH_ROOT/ROOT/, I want to use $VH_ROOT/ROOT/current/public/

My configuration works for a moment, but after a few minutes, the server tries to load files from $VH_ROOT/ROOT/ instead of $VH_ROOT/ROOT/current/public/ without any changes in the configuration.

When I redeploy the load balancers and the the application servers, I works again.

Here's what I did to change the document root:

In LiteSpeedWEB Server, the virtual host root has been updated

  • Virtual Hosts → General → Virtual Host Root : $VH_ROOT/ROOT/current/public/
  • Virtual Hosts Templates → PHP_SuEXEC → General → Virtual Host Root $VH_ROOT/ROOT/current/public/
  • Virtual Hosts Templates → centralConfigLog → General → Virtual Host Root $VH_ROOT/ROOT/current/public/

In /home/litespeed/bin/setupWP.sh, the following constant value has been updated
SERVER_WEBROOT=/var/www/webroot/ROOT/current/public/

In /etc/jelastic/redeploy.conf, the following path were added:

  • /home/litespeed/bin/setupWP.sh
  • /usr/local/lsws/lsphp/etc/php.ini
  • /var/www/conf/vhconf.xml

Did I miss something?

Update : I have found that one of the vhconf.xml kept the default value for the document root. After having changed the value manually in this file all web servers use the desired document root.

Hi @benoitchantre,
Do you have applied this configuration on all web servers nodes?

Hi @sych74,

From what I remember, I did the document root change from the admin only at first.
Then, after understanding the issue, I updated manually vhconf.xml on the server which had the wrong value. This fixed the issue.

When we update values from the GUI, this should update vhconf.xml on all servers, right?

--

Update: I can confirm you that the docRoot value in vhconf.xml has only been updated in the main web server node (tested on a fresh environnement).

Hi @benoitchantre,
Correct, the vhconf.xml config is updated only on the main web server node.

@sych74 Is it a bug then?

@benoitchantre
It's not a bug. Any changes need to be added to all nodes in the layer. For new nodes they will be applied automatically.

@sych74 Thank you for clarifying that.

It would be useful to add this info in the documentation. This will avoid headaches to many people.

In Jelastic UI and in emails sent by Jelastic, you only get the link to the main node. That’s why I expected the changes done in the LiteSpeed console to be applied to other nodes of the same type.

@benoitchantre Thank you,
We will add the note about app servers configuration to email.