You are not logged in.
Env: Debian Buster on GCLoud VM.
Latest GLPI
PHP 8.1
Apache2
Hello! Anyone experienced with running GLPI on Linux Debian with Apache2 (you know, all the sites-enabled, config-enabled, available, etc etc? I've checked the forums and googled quite a bit. PHP logs not showing a lot that I can use; Apache2 logs either.
Basically, htt ps://glpi-install.readthedocs.io/en/latest/install/index.html GLPI documentation states the following in order to install:
Uncompress the archive in your website;
Give your webserver write access to the files and config directories;
launch installation wizard (or use the command line installation script).
I extracted the data in my website (I just thrown it into /var/www/glpi), however when I check the http s://glpi-install.readthedocs.io/en/latest/prerequisites.html#webserver-configuration]server configuration docs I noticed
DocumentRoot /var/www/glpi/public
... so should I dump the tarball into glpi/public or /glpi?
I did give www-data write access to all of glpi/*
Also the ht ps://glpi-install.readthedocs.io/en/latest/install/wizard.html launch installation wizard bit is a bit confusing, it reads "To begin installation process, point your browser to the GLPI main address: htt ps://{adresse_glpi}/" should I setup SSL to the installation? Where do I configure {adresse_glpi}?
Needles to say, when I run it without https I get the infamous "PHP 7.4.0 - 8.3.0 (exclusive) required" message, although php --version throws "PHP 8.1.18 (cli) (built: Apr 14 2023 04:40:29) (NTS)"
So I'm not sure if I should throw away this VM, spin up a new one and try all over again? Do I need any special permissions from the sites-enabled file?
Maybe there's some script on github that can simplify installation? I've googled but could not find anything :-/
Thanks a lot in advance for any help or tips provided!!
PS: Sorry for the sloppy links, I cannot post links with BBCode.
Offline
"so should I dump the tarball into glpi/public or /glpi"
Your GLPI instance should end up with a glpi folder in /var/www or /var/www/html and inside the glpi folder should be, among others, folders named ajax, front, inc, public, src, etc. The DocumentRoot in the Apache config is to help route all requests through the internal router.
The goal is to use this router to only allow access to specific files/folders over the web. The installation documentation therefore is still correct by saying just "Uncompress the archive in your website".
"should I setup SSL to the installation"
You should absolutely use SSL. I'd say it is highly recommended if your GLPI is available from the Internet and future features of GLPI may require HTTPS as some browser features cannot be used unless the site is accessed securely.
You can use a certificate from a public issuer like LetsEncrypt (free).
"Where do I configure {adresse_glpi}"
You can configure this in your Apache vhost configuration. By default, it would just be your server's IP or hostname followed by '/glpi'.
"although php --version throws "PHP 8.1.18 (cli)"
It says that because you are checking the default system PHP version but not what Apache is using. Make sure the correct PHP module for Apache is enabled.
Check which PHP version has an enable modules:
ls /etc/apache2/mods-enabled/
Disable a PHP module (change for the PHP version currently enabled):
a2dismod php7.3
Enable the compatible PHP version:
a2enmod php8.1
Restart Apache:
systemctl restart apache2
"Maybe there's some script on github that can simplify installation?"
There isn't currently an official complete install script and I don't think there would be one given the number of different possible system configurations.
Instead, there is a desire to have an official docker image for GLPI at some point.
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Hello @cconard96! Thank you so much for replying and helping me!
The installation documentation therefore is still correct by saying just "Uncompress the archive in your website".
I totally agree with you, it's just that for example me, coming from an Telecomm/VoIP/Networking background, and not so much immersed into web-dev or internet stuff from a Website aspect, I was just confused about the term website in itself. I was seeing more 'website' as a collection of webpages/documents more than the Linux directory from where (for example Apache) pulls the web documents to present to the internet.
Once you explained it with the examples it was clear as water, thank you
"Where do I configure {adresse_glpi}"
You can configure this in your Apache vhost configuration. By default, it would just be your server's IP or hostname followed by '/glpi'.
I'm having a bit of trouble with this. I'm not sure why. So what I did was actually redo my VM, make sure I have everything installed correctly before downloading the tar file.
But... when I add this vhost to /etc/apache2/sites-enabled/000-default.conf Apache2 simply crashes on restart:
<VirtualHost *:80>
ServerName glpi.localhost
DocumentRoot /var/www/glpi/public
# If you want to place GLPI in a subfolder of your site (e.g. your virtual host is serving multiple applications),
# you can use an Alias directive:
# Alias "/glpi" "/var/www/glpi/public"
<Directory /var/www/glpi/public>
Require all granted
RewriteEngine On
# Redirect all requests to GLPI router, unless file exists.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</Directory>
</VirtualHost>
It's odd because before adding this was simply working ok.
Offline
Disregard! I managed to get some logs from systemctl, tuned out I didn't have 'rewrite' enabled with a2enmod!
Offline