2 installations of dolibarr on same server

hello everyone ,from few days ago i was trying to install a second dolibarr 6.0.3 on my VPS ubuntu 16.04 LTS server , i have the first one works fine , but what i understood from tips of installing a second one and correct me if i am wrong : is creating a new folder for exemple dolibarr2 and extract the zip content of dolibarr installation after downloading it in the dolibarr2 folder , then create a new config folder for exemple etc/dolibarr2 same as existed in etc/dolibarr but copying the dolibarr content into the etc/dolibarr2 folder, under both we have a conf.php file wich is in fact driving me crazy , we have to edit the second conf.php file to work with the new installation, so i edited it but it’s not working , and here is the both conf.php files in some details , so can you help me find the solution for it ? thank you

etc/dolibarr/ nano conf.php :

$dolibarr_main_url_root=‘http://ip_de_server/dolibarr’;
$dolibarr_main_document_root=’/usr/share/dolibarr/htdocs’;
//$dolibarr_main_url_root_alt=’/custom’;
//$dolibarr_main_document_root_alt=’/usr/share/dolibarr/htdocs/custom’;
$dolibarr_main_data_root=’/var/lib/dolibarr/documents’;
$dolibarr_main_db_host=‘localhost’;
$dolibarr_main_db_port=‘3306’;
$dolibarr_main_db_name=‘dolibarr’;
$dolibarr_main_db_prefix=‘llx_’;
$dolibarr_main_db_user=‘dolibarr’;
$dolibarr_main_db_pass=‘mot_de_passe’;
$dolibarr_main_db_type=‘mysqli’;

----------------------------------------------------------------

etc/dolibarr2/ nano conf.php :

$dolibarr_main_url_root=‘http://ip_de_server/dolibarr2’;
$dolibarr_main_document_root=’/usr/share/dolibarr2/htdocs’;
//$dolibarr_main_url_root_alt=’/custom’;
//$dolibarr_main_document_root_alt=’/usr/share/dolibarr2/htdocs/custom’;
$dolibarr_main_data_root=’/var/lib/dolibarr2/documents’;
$dolibarr_main_db_host=‘localhost’;
$dolibarr_main_db_port=‘3306’;
$dolibarr_main_db_name=‘dolibarr2’;
$dolibarr_main_db_prefix=‘llx_’;
$dolibarr_main_db_user=‘dolibarr2’;
$dolibarr_main_db_pass=‘mot_de_passe’;
$dolibarr_main_db_type=‘mysqli’;

bu it’s not working yet i get this error

The requested URL /dolibarr2 was not found on this server.
Apache/2.4.10 (Debian) Server at [serverip] Port 80

What and how did you copy to create dolibarr2 folder?

Pls. submit the commands you’ve used.

Best regards

You have copied folder but not added new sub domain or domain to it. It is nothing to do with dolibarr.

I had to create a subdomain to access my other dolibarr versions

I think yes ( I dont know your server setup).
You can test like this:
Create a new folder say ‘test’ at same level where you have dollibarr2
Put any html or php file in test folder.and try to access this html file e.g. http://ip_de_server/test/test.html
see if you can access this/ If can not you have to setup subdomain.

Other alternative is put dolibarr2 folder inside dolibarr and then access it like http://ip_de_server/dolibarr/dolibarr2 ( but I think you will get errors for duplicate modules)