hdtor2019-06-29 09:17:59
Apache HTTP Server
hdtor, 2019-06-29 09:17:59

Apache how to deny access by IP?

There is an Apache web server, it has 2 IPs, I need to host two sites and make their own IP for each. Made:

ServerName one.ru
ServerAlias www.one.ru
DocumentRoot "/var/www/html/one.ru"

ServerName two.ru
ServerAlias two.ru
DocumentRoot "/var/www/html/two.ru"

Everything works, but the problem is that when accessing the IP there is access to the site. This needs to be avoided.
How to do?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
pcdesign, 2019-06-29


CityCat4, 2019-06-29

Make a stub that will direct to a dummy site (yes, even to "It worked" from Apache :) )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question