14

I've set up a dev-enviroment on Debian 7 and installed the following services:

  • Apache
  • Bind9

I have one site that is reachable through "asix.debian.local". I've set up the zone and added NS and A registry to the db.debian.local file.

Everything is working, this is the response I get with curl:

"curl asix.debian.local"

Apache default

    <h1> It works!! </h1>
    <h2> Aquest es la pagina de benvinguda de ASIX </h2>

So I guessed I got everything up and working, but when I type in the same URL in browser, I get "Server not found error - Iceweasel can't find the server at asix.debian.local."

Only nameserver in /etc/resolv.conf is the local IP of the server.

Why can't browser reach the website if curl did?

Any help is appreciated.

Thanks

DavidPostill
  • 162,382
Borjante
  • 243

3 Answers3

7

For someone reading this in the future:

For me it wasn't a DNS issue but one with https:

curl my-domain.com worked because it used http protocol. However, modern browsers seem to always attempt to use https nowadays and that's not always obvious.

So for me, setting up letsencrypt and enabling https solved the issue.

C. Doe
  • 171
2

For such case please add line in /etc/nsswitch.conf

hosts: files dns mdns4_minimal [NOTFOUND=return] mdns4

to be

hosts: dns files mdns4_minimal [NOTFOUND=return] mdns4
Romeo Ninov
  • 7,848
0

Removing the headers is what worked for me:

  // headers: {
  //   "Content-Type": "multipart/form-data"
  // },
Aakash
  • 211