Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server not working reliably after changing document root #241

Open
benoitchantre opened this issue Nov 12, 2022 · 7 comments
Open

Server not working reliably after changing document root #241

benoitchantre opened this issue Nov 12, 2022 · 7 comments

Comments

@benoitchantre
Copy link

benoitchantre commented Nov 12, 2022

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.

@sych74
Copy link
Collaborator

sych74 commented Nov 14, 2022

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

@benoitchantre
Copy link
Author

benoitchantre commented Nov 14, 2022

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).

@sych74
Copy link
Collaborator

sych74 commented Nov 15, 2022

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

@benoitchantre
Copy link
Author

@sych74 Is it a bug then?

@sych74
Copy link
Collaborator

sych74 commented Nov 16, 2022

@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.

@benoitchantre
Copy link
Author

@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.

@sych74
Copy link
Collaborator

sych74 commented Nov 21, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants