Created
March 4, 2020 02:13
-
-
Save sujunmin/6877e56dfe155fae416ffdf9358aade3 to your computer and use it in GitHub Desktop.
Nginx Test Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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