mirror of
https://git.dn42.dev/lare/myip.dn42.git
synced 2024-10-24 03:11:33 +02:00
added nginx config
This commit is contained in:
parent
f042f5e5f7
commit
7feff33885
1 changed files with 25 additions and 0 deletions
25
nginx-config/myip.dn42-nginx.conf
Normal file
25
nginx-config/myip.dn42-nginx.conf
Normal file
|
@ -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": "<yourAS-without-AS>", "node_location": "<node country code>", "node_id": "<nodename or so>"}';
|
||||
}
|
||||
|
||||
location = / {
|
||||
root /path/to/myip-wwwroot;
|
||||
index index.html;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue