Answer the question
In order to leave comments, you need to log in
Does Apache server incorrectly process irrelevant requests for domain names located on the same IP address?
There is a server on Ubuntu with a LAMP stack deployed and virtual hosting.
The server hosts several sites on the same IP.
The IP itself is white, there are no problems with access, a server behind a nat with forwarded ports.
The situation is that there are several domains
domen1, domen2, domen3. When making any irrelevant request, for example, to domain 3 - domen3/123 (directory 123 does not exist) or a direct request by IP, the server redirects the request to the first domain in the list, that is, domen1.
How can I change this so that when a request is made, the answer comes from the domain to which this question was addressed. Or if there is no such directory, then the server returned a response that such a site does not exist or ignored these requests altogether.
Now the scheme has been implemented using crutches, the domen0 folder has been created, virtual hosting has been activated associated with this folder and custom pages with 404 and 403 errors have been loaded, if there is an irrelevant request to any of the domains, then the request is redirected to the first folder in the list - domen0 and the user receives a response with an error code.
I ask for help on how to correctly implement the Apache web server settings to correctly process incoming irrelevant requests.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question