Autodected Value for dolibarr_main_url_root

Hello All,

I modified the parameter dolibarr_main_url_root in my conf.php file to my virtual address but it still points to the physical address and in the config it dispplays that currently this parameter is overwritten by autodetected value which is my physical address.

I want to know please how to disable this autodetected value or where to change it.

Thank you.

Hi akhiar,

This gets defined by the SCRIPT_NAME value provided by your server, it will thus depends on its configuration. Make it listen to the ip and/or fdqn you wish it to reply to.

Regads,
Marc

Hello and thanks for your reply,

Can you give more details please (about the config file in which I have to change this value) I m a little bit confused.

Regards.

Sure, this is in your webserver configuration (apache or nginx ?) where you define the virtual hosts listeners.
Dolibarr “resets” this address based on how it was accessed to avoid misconfiguration leading to service failure.
Regards

Ok. You are listening on all addresses. Replace the ‘*’ by the ip your want the server to be bound to.
Somehow, the server saw you coming from 172.16.18.20
I sort of wonder what you are trying to achieve actually…
Regards,
Marc

Yes I m sorry I wasnt clear enough. Well, First time I installed dolibarr it was accessible by my physhical address which is (172.16.18.20) and now I created a virtual IP for dolibarr in WAF so I want my instance dolibarr to be accessible by the virtual address and what it does now is that once I insert my virtual adress in the browser it tries to redirect me to the physical address in the browser which is not what I want …

Still didn’t work although I changed it like suggested :confused:

What you want to do is difficult, owing to the routing through a virtual network that will have to go through your pysical network card. What about making it “logical” as opposed to “physical”, that is use named domain addresses ? You may get a better “soft” control on the routing.

Regards,
Marc