Relevant discussions:
dobri diem guys
look at this:
https://github.com/ibksturm/dnscrypt-switzerland/blob/master/etc/nginx/conf.d/doh.conf
server {
listen 80;
listen [::]:80;
server_name [URLName];
return 301 https://$server_name$request_uri;
}
server {
listen [::]:443 ssl http2;
listen 443 ssl http2;
root /var/www/[Path];
access_log off;
error_log off;
# Add index.php to the list if you are using PHP
index index.html;
server_name [URLName];
include /etc/nginx/ssl.conf;
include /etc/nginx/http_header.conf;
ssl_session_cache shared:ssl_doh_cache:2048m;
location / {
try_files $uri $uri/ =404;
}
if ( $request_method !~ ^(GET|POST|HEAD)$ ) {
return 501;
}
location /dns-query {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_buffering on;
proxy_http_version 1.1;
proxy_read_timeout 6s;
proxy_connect_timeout 6s;
proxy_pass https://dns_doh_servers;
}
location ~ /\.ht {
deny all;
}
}
upstream dns_doh_servers {
least_conn; #dnsproxy or AGH
server 127.0.0.1:8540;
server 127.0.0.1:8541;
server 127.0.0.1:8542;
server 127.0.0.1:8543;
}
https://github.com/ibksturm/dnscrypt-switzerland/blob/master/etc/nginx/stream.conf.d/dot.conf
server {
listen 8553 so_keepalive=on reuseport;
listen [::]:8553 so_keepalive=on;
access_log off;
error_log off;
proxy_buffer_size 1k;
proxy_connect_timeout 10s;
proxy_timeout 10s;
proxy_pass dns_dot_servers;
}
upstream dns_dot_servers {
least_conn; #dnsproxy or AGH
server 127.0.0.1:8640;
server 127.0.0.1:8641;
server 127.0.0.1:8642;
server 127.0.0.1:8643;
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
bad bot
@szolin let's just add this to FAQ since we now have it: https://github.com/AdguardTeam/AdGuardHome/wiki/FAQ
Most helpful comment
bad bot