33 lines
600 B
Django/Jinja
33 lines
600 B
Django/Jinja
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
server_name {{ librenms_domain }};
|
|
|
|
root /opt/librenms/html;
|
|
|
|
index index.php;
|
|
|
|
location / {
|
|
try_files $uri $uri/ @librenms;
|
|
}
|
|
|
|
location ~ \.php {
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
|
fastcgi_intercept_errors on;
|
|
}
|
|
|
|
location ~ /\.ht {
|
|
deny all;
|
|
}
|
|
|
|
location @librenms {
|
|
rewrite api/v0(.*)$ /api_v0.php/$1 last;
|
|
rewrite ^(.+)$ /index.php/$1 last;
|
|
}
|
|
}
|