myip.dn42/nginx-config/myip.dn42-nginx.conf

30 lines
758 B
Text
Raw Normal View History

2022-09-17 21:45:22 +02:00
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];
root /path/to/myip-wwwroot;
index index.html;
location /raw {
2022-09-17 21:45:22 +02:00
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": "<yourAS-without-AS>", "node_location": "<node country code>", "node_id": "<nodename or so>"}';
}
#location = / {
#
#}
2022-09-17 21:45:22 +02:00
}