N
N
Nikolay2016-04-19 19:51:22
Apache HTTP Server
Nikolay, 2016-04-19 19:51:22

How to display ERR_NAME_NOT_RESOLVED error by default (apache)?

I already have apache configured, all sites work well. But when you try to access the fake subdomain (blabla.test.ru), apache returns the first site from the list of configs. What parameter needs to be changed so that by default, if such a site is not enabled, then apache gives an error - ERR_NAME_NOT_RESOLVED?
Now I could only make a 403 error if they come in by a non-existent subdomain or by ip. But still I want to give the impression that there is nothing at all.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Zhivotnev, 2016-04-19
@inkvizitor68sl

No way, the ERR_NAME_NOT_RESOLVED error is generated by the browser when it cannot resolve some domain, the web server is not involved here.
Nginx can return code 444 ("nothing"), Apache cannot.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question