docs: Update Ubuntu and CentOS nginx install doc with a better nginx config (#6836)

* docs: Update install doc with a beter nginx config

* Updated LibreNMS API Location to v0

* Updated LibreNMS API Location to v0
This commit is contained in:
Nicolas
2017-06-22 23:49:13 +02:00
committed by Neil Lathwood
parent 02a7949c5e
commit fb548a9732
2 changed files with 10 additions and 10 deletions

View File

@ -101,10 +101,14 @@ server {
index index.php;
access_log /opt/librenms/logs/access_log;
error_log /opt/librenms/logs/error_log;
charset utf-8;
gzip on;
gzip_types text/css application/javascript text/javascript application/x-javascript image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
location / {
try_files $uri $uri/ @librenms;
try_files $uri $uri/ /index.php?$query_string;
}
location /api/v0 {
try_files $uri $uri/ /api_v0.php?$query_string;
}
location ~ \.php {
include fastcgi.conf;
@ -114,10 +118,6 @@ server {
location ~ /\.ht {
deny all;
}
location @librenms {
rewrite api/v0(.*)$ /api_v0.php/$1 last;
rewrite ^(.+)$ /index.php/$1 last;
}
}
```

View File

@ -77,10 +77,14 @@ server {
index index.php;
access_log /opt/librenms/logs/access_log;
error_log /opt/librenms/logs/error_log;
charset utf-8;
gzip on;
gzip_types text/css application/javascript text/javascript application/x-javascript image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
location / {
try_files $uri $uri/ @librenms;
try_files $uri $uri/ /index.php?$query_string;
}
location /api/v0 {
try_files $uri $uri/ /api_v0.php?$query_string;
}
location ~ \.php {
include fastcgi.conf;
@ -90,10 +94,6 @@ server {
location ~ /\.ht {
deny all;
}
location @librenms {
rewrite api/v0(.*)$ /api_v0.php/$1 last;
rewrite ^(.+)$ /index.php/$1 last;
}
}
```