summaryrefslogtreecommitdiffstats
path: root/glpi-nginx.conf
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-10-17 08:37:33 +0200
committerRemi Collet <fedora@famillecollet.com>2014-10-17 08:37:33 +0200
commitd4844e5c2f52dd1a4199506d79fd09da143d52b7 (patch)
tree9224e3133563eb71827e6cd31eaf02e7989b8b8e /glpi-nginx.conf
parent974aa23e62556c37a4d4f3056516bd03c86aeeb4 (diff)
glpi: rawhide changes
Diffstat (limited to 'glpi-nginx.conf')
-rw-r--r--glpi-nginx.conf48
1 files changed, 48 insertions, 0 deletions
diff --git a/glpi-nginx.conf b/glpi-nginx.conf
new file mode 100644
index 0000000..68ae1bf
--- /dev/null
+++ b/glpi-nginx.conf
@@ -0,0 +1,48 @@
+# 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 php-fpm;
+ }
+
+ 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 php-fpm;
+ }
+}