Welcome back, everyone! In our previous article, we successfully walked through the installation process of the GLPI system. However, after completing the installation, you may have encountered a notable warning on the homepage: Web server root directory configuration is not safe as it permits access to non-public files as shown below:
Don’t worry, in this article, we will explore a detailed solution to eliminate this warning and ensure that your GLPI system is deployed safely and efficiently.
Read more
- How to Install GLPI 10 on Ubuntu 22.04 | 20.04 | 18.04 LTS
- How to Install and Configure GLPI 10 on CentOS | CentOS Stream | RockyLinux | AlmaLinux | RHEL
- How to Upgrade GLPI to Latest version on Ubuntu/Debian
- How to Synchronize Users from Active Directory to GLPI
- How to Install and Configure phpMyAdmin on Ubuntu with Apache
Fix Warning
Open the terminal window and navigate to the GLPI installation directory. In this example, my GLPI installation directory is /var/www/html/glpi
.
cd /var/www/html
ls
To disable that warning, open and edit the SafeDocumentRoot.php
file in the glpi/src/System/Requirement/
directory with the following command:
sudo vim glpi/src/System/Requirement/SafeDocumentRoot.php
Navigate to the end of the file, and you will see the warning as displayed in the image below:
To disable the warning, press the i
key to switch to the editing mode in vim and add the command return;
just above it.
After finishing, save and exit the file by pressing Esc
, entering the command :x
, and then pressing Enter
Next, restart the web server to apply the changes:
sudo systemctl restart apache2
Finally, refresh the page by pressing the F5
key, and you will notice that the warning no longer appears on the GLPI homepage.
There you have it, we have successfully disabled the warning Web server root directory configuration is not safe as it permits access to non-public files. Wishing you success, and don’t forget to subscribe to my YouTube channel.