i have to put a /dolibarr at the end of the url or it will it will not work
is there a way to get rid of the back part?
Hello,
You don’t need to have Dolibarr, you can put it at the root directory
How would you put it in the root directory
It’s not very clear what are you really asking for. But if i suppose that you needing now to access to your Dolibarr with this URL:
BUT you would like to use this other URL:
Then you must modify the apache config for the corresponding virtual host (if you’re using apache). Something like this works for me:
- edit file:
/etc/apache2/sites-available/mydomain.com.conf
<VirtualHost *:80>
DocumentRoot /home/sergi/www/mydomain.com/htdocs
ServerName mydomain.com
ServerAlias www.mydomain.com
<Directory "/home/sergi/www/mydomain.com/htdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
UseCanonicalName off
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
DocumentRoot /home/sergi/www/mydomain.com/htdocs
ServerName mydomain.com
ServerAlias www.mydomain.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/home/sergi/www/mydomain.com/htdocs">
SSLOptions +StdEnvVars
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
</IfModule>
It can vary depending on your settings, but the important part to get the URL be only the domain name is this line:
DocumentRoot /home/sergi/www/mydomain.com/htdocs
defining the DocumentRoot of the website. Please, don’t confuse with the DOCUMENT directory in Dolibarr, is the opposite: for apache, the DocumentRoot is where are the PHP scripts accessible from web browser… so the htdocs
directory in the case of Dolibarr.
how would you do that on a windows install
Hello,
Depends on how you have setup your installation, and how you have declared your domain.