Change dolibarr_main_url_root + DOLI_URL_ROOT

To make url space for something else on my hostname I want to move my fully functional dolibarr installation from / to /dolibarr/.

I’m running docker.io/upshift/dolibarr 18.0.1

I edited conf.php and changed dolibarr_main_url_root to hostname + /dolibarr/

I deleted my container and created it again with the environment variable DOLI_URL_ROOT set to hostname + /dolibarr/.

If I access this container it can not find /dolibarr/ but if i access / it looks normal?

If I access /dolibarr/ I get a 404 from Apache, so the request does get to the container.

I front of this container I have another container which runs nginx which does a proxy of host/dolibarr/ to this dolibarr container. My guess is that it adds /dolibarr/ to the url it requests from the container.

The nginx is used to make space for other containers, in the url space, and I also had it before I started running dolibarr. In the beginning I just used / and that worked fine in nginx and dolibarr, but not with /dolbiarr/

Do I need to change the database? I wonder why it doesn’t even work with /dolibarr/ when accessing the apache directly?

It seems like i fixed my issue by just running this command

ln -s . dolibarr

in the htdocs directory :slight_smile: :smiley:

This link solution gave me some errors in module configuration

Error: Module modBanque was found twice: Into /var/www/html/core/modules/ and /var/www/html/dolibarr/core/modules/. You probably have an old file on your disk.

Error: Module modStripe was found twice: Into /var/www/html/core/modules/ and /var/www/html/dolibarr/core/modules/. You probably have an old file on your disk.

Error: Module modFTP was found twice: Into /var/www/html/core/modules/ and /var/www/html/dolibarr/core/modules/. You probably have an old file on your disk.

Error: Module modGravatar was found twice: Into /var/www/html/core/modules/ and /var/www/html/dolibarr/core/modules/. You probably have an old file on your disk.

I am not sure I’m going to fix them though, they do seem harmless.