summarylogtreecommitdiffstats
path: root/nginx.example.conf
blob: 61160a9ea9b850cc864db5bf4e6878e1828357a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
server {
 listen      80;
 server_name librenms.example.com;
 root        /usr/share/webapps/librenms/html;
 index       index.php;
 access_log  /var/log/nginx/librenms_access.log;
 error_log   /var/log/nginx/librenms_error.log;
 location / {
  try_files $uri $uri/ @librenms;
 }
 location ~ \.php {
  fastcgi_param PATH_INFO $fastcgi_path_info;
  include fastcgi.conf;
  fastcgi_split_path_info ^(.+\.php)(/.+)$;
  fastcgi_pass unix:/var/run/php5-fpm.sock;
 }
 location ~ /\.ht {
  deny all;
 }
 location @librenms {
  rewrite api/v0(.*)$ /api_v0.php/$1 last;
  rewrite ^(.+)$ /index.php/$1 last;
 }
}