Skip to content

Instantly share code, notes, and snippets.

@defektive
defektive / nginx.conf
Last active April 25, 2018 21:44 — forked from aterreno/nginx.conf
Let's say that for some reason you want to execute an OS command via HTTP...
worker_processes 1;
user root;
error_log /tmp/.nginx.log;
events {
worker_connections 1024;
}
http {
server {
listen 8080;
location / {
s.sort((a,b) => {
a = a.replace(/^[a-z]+:\/\//, '')
b = b.replace(/^[a-z]+:\/\//, '')
a = a.split("/")[0];
b = b.split("/")[0];
if (a.indexOf('.') === -1) return 1
if (b.indexOf('.') === -1) return -1
let aa = a.split("."),
bb = b.split("."),