Skip to content

Instantly share code, notes, and snippets.

@sujunmin
Created March 4, 2020 02:13
Show Gist options
  • Save sujunmin/6877e56dfe155fae416ffdf9358aade3 to your computer and use it in GitHub Desktop.
Save sujunmin/6877e56dfe155fae416ffdf9358aade3 to your computer and use it in GitHub Desktop.
Nginx Test Config
events {
}
http {
server {
listen 80;
server_name 10.0.12.26;
root /opt/librenms/html;
index index.php;
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/ /index.php?$query_string;
}
location /api/v0 {
try_files $uri $uri/ /api_v0.php?$query_string;
}
location ~ \.php {
include fastcgi.conf;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment