mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@ -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;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user