From reload.go.ro, 3 Years ago, written in Plain Text.
This paste is a reply to Untitled from librenms - go back
Embed
Viewing differences between Untitled and Re: Untitled
#server {
{
# listen      80;
80;
# server_name web01.lathwood.uk;
uk;
# return 301 https://$host$request_uri;
#}

https://$host$request_uri;
#}

server {
 
{
 
listen 443 ssl http2;
http2;
 server_name web01.lathwood.uk;
 
uk;
 
root        /opt/librenms/html;
/opt/librenms/html;
 index       index.php;
php;
 ssl_certificate /etc/letsencrypt/live/web01.lathwood.uk/cert.pem;
pem;
 ssl_certificate_key /etc/letsencrypt/live/web01.lathwood.uk/privkey.pem;
 
pem;
 
access_log  /opt/librenms/logs/access_log;
 
/opt/librenms/logs/access_log;
 
error_log   /opt/librenms/logs/error_log;
 
/opt/librenms/logs/error_log;
 
gzip on;
 
on;
 
gzip_types text/css application/javascript text/javascript pplication/x-javascript text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;

 
image/x-icon;

 
location / {
  
{
  
try_files $uri $uri/ @librenms;
@librenms;
#    auth_basic "Restricted";
"Restricted";
#    auth_basic_user_file /etc/nginx/.htpasswd;
 }
htpasswd;
 }
 location ~ \.php {
{
  include fastcgi.conf;
conf;
  fastcgi_split_path_info ^(.+\.php)(/.+)$;
+)$;
  fastcgi_pass 127.0.0.1:9000;
 }
1:9000;
 }
 location ~ /\.ht {
  
{
  
deny all;
 }
 
all;
 }
 
location @librenms {
{
  rewrite api/v0(.*)$ /api_v0.php/$1 last;
last;
  rewrite ^(.+)$ /index.php/$1 last;
 }
}
last;
 }
}