Local DNS dont Work

hosting

#1

IF I USE THIS CODE, ITS WORKS ----- h.t.t.p.s://192.168.0.17


RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . h.t.t.p.s://192.168.0.17/%{REQUEST_URI} [L]


RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . h.t.t.p.s://192.168.0.17/%{REQUEST_URI} [L]


WHEN I USE A NAME, DOES NOT WORK


RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . h.t.t.p.s://business.com/%{REQUEST_URI} [L]


RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . h.t.t.p.s://business.com/%{REQUEST_URI} [L]

Aneyone know to help me ???


#2

Hi Daniloop,

you might need to add

resolver 127.0.0.1;

into the server block to tell nginx which resolver to use. You can also add the DNS resolver of e.g. Google (8.8.8.8). Nevertheless, it is recommended to have a DNS resolver on our own server.


#3

Did the solution work?