Package: glpi Version: 0.84.8+dfsg.1-1 Severity: wishlist Dear Maintainer,
I installed GLPI on a Jessie system and try to make it run with nginx, one of the httpd Debian server. But there are no nginx configuration examples. And GLPI needs nginx paases some specific parameters to php-fpm (i.e. SERVER_NAME). I got some help from GLPI DEV and want to share it with Debian. So, I attached 2 nginx configs (a vhost and a subdir). If you find it useful, please, feel free to add these configs to glpi documentation. Jean-Marc -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (500, 'testing'), (100, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=fr_BE.utf8, LC_CTYPE=fr_BE.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
# GLPI server { server_name glpi.example.com; index index.php; root /usr/share/glpi; access_log /var/log/nginx/glpi-access.log; error_log /var/log/nginx/glpi-error.log; location ~ ^/(files|config|scripts|locales)/(.+)$ { deny all; } location /install/mysql { deny all; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_intercept_errors on; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param SERVER_NAME $host; # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; } # Install is only allowed via local access (from the GLPI server). # Add your IP address if you need it for remote installation, # but remember to remove it after installation for security. location ~ ^/install/(.+\.php)$ { allow 127.0.0.1; allow ::1; deny all; try_files $uri =404; fastcgi_intercept_errors on; include fastcgi_params; fastcgi_param SERVER_NAME $host; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/var/run/php5-fpm.sock; } }
# GLPI location = /glpi { alias /usr/share/glpi/; } location /glpi/ { root /usr/share; index index.php; location ~ ^/glpi/config/(.+)$ { deny all; } location ~ ^/glpi/scripts/(.+)$ { deny all; } location ~ ^/glpi/locales/(.+)$ { deny all; } location /glpi/install/mysql { deny all; } # Install is only allowed via local access (from the GLPI server). # Add your IP address if you need it for remote installation, # but remember to remove it after installation for security. location ~ ^/glpi/install/(.+\.php)$ { allow 127.0.0.1; allow ::1; deny all; try_files $uri =404; fastcgi_intercept_errors on; include fastcgi_params; fastcgi_param SERVER_NAME $host; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/var/run/php5-fpm.sock; } location ~ ^/glpi/(.+\.php)$ { try_files $uri =404; fastcgi_intercept_errors on; include fastcgi_params; fastcgi_param SERVER_NAME $host; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/var/run/php5-fpm.sock; } }