2016-07-06 13:26:42 +02:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
listen [::]:80;
|
|
|
|
|
|
|
|
server_name {{ librenms_domain }};
|
|
|
|
|
2016-07-07 07:03:53 +02:00
|
|
|
root /usr/share/librenms/html;
|
2016-07-06 13:26:42 +02:00
|
|
|
|
|
|
|
index index.php;
|
|
|
|
|
2016-07-06 16:28:16 +02:00
|
|
|
location / {
|
|
|
|
try_files $uri $uri/ @librenms;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ \.php {
|
2016-07-06 13:26:42 +02:00
|
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
|
|
include fastcgi_params;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
2017-09-03 14:35:56 +02:00
|
|
|
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
|
2016-07-06 13:26:42 +02:00
|
|
|
fastcgi_intercept_errors on;
|
|
|
|
}
|
2016-07-06 16:28:16 +02:00
|
|
|
|
|
|
|
location ~ /\.ht {
|
|
|
|
deny all;
|
|
|
|
}
|
|
|
|
|
|
|
|
location @librenms {
|
|
|
|
rewrite api/v0(.*)$ /api_v0.php/$1 last;
|
|
|
|
rewrite ^(.+)$ /index.php/$1 last;
|
|
|
|
}
|
2016-07-06 13:26:42 +02:00
|
|
|
}
|