diff --git a/nginx-config/myip.dn42-nginx.conf b/nginx-config/myip.dn42-nginx.conf new file mode 100644 index 0000000..d38dc41 --- /dev/null +++ b/nginx-config/myip.dn42-nginx.conf @@ -0,0 +1,25 @@ +server { + listen 172.20.0.81:80; + listen [fd42:d42:d42:81::1]:80; + server_name myip.dn42; + server_name *.myip.dn42; + server_name 172.22.0.81; + server_name [fd42:d42:d42:81::1]; + location /raw { + return 200 '$remote_addr\n'; + add_header Content-Type text/plain; + } + + location = /api { + keepalive_requests 0; + default_type application/json; + add_header 'Access-Control-Allow-Origin' '*'; + return 200 '{"version": "1.0", "ip": "$remote_addr", "server": "$server_addr","node_as": "", "node_location": "", "node_id": ""}'; + } + + location = / { + root /path/to/myip-wwwroot; + index index.html; + } + +}