Objective: I want to use a Windows server for local DNS
Running into an issue and I have seen and tried many different suggestions here and everywhere and the result is the same. I am sure it is something simple but cant put my finger on it.
Any help would be appreciated.
I have tried using a proxy_pass, upstream configuration and resolver and still the same error.
resolver 10.90.10.11 valid=10s;
server {
location / {
set $backend_servers example.com;
proxy_pass http://$backend_servers;
}
}
https://www.nginx.com/blog/dns-service-discovery-nginx-plus/
**Error**
nginx: [emerg] duplicate location "/" in /etc/nginx/sites-enabled/example.com:20
**Configuration:**
nginx/1.18.0 (Ubuntu)
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
Application: Wordpress 6.2
Reverse-Proxy Config
`server {
listen 443 ssl;
root /var/www/html/wordpress;
index index.php index.html index.htm;
server_name example.com;
access_log /var/log/nginx/reverse-access.log;
error_log /var/log/nginx/reverse-error.log;
ssl_certificate /etc/ssl/ssl-bundle.crt;
ssl_certificate_key /etc/ssl/mykey.comkey.key;
ssl_stapling on;
ssl_stapling_verify on;
client_max_body_size 500M;
location / {
try_files $uri $uri/ /index.php?$args;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}`
Hosts File
cpadmin@3SWEB1:/etc$ cat hosts
127.0.0.1 localhost
127.0.1.1 3SWEB1
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
10.90.10.11 example.com #Windows DNS server
Netstat -plnt
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 ::1:631 :::* LISTEN -
Tried these three solutions: