H
H
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:

<VirtualHost 69.220.25.218:80>
ServerName one.ru
ServerAlias www.one.ru
DocumentRoot "/var/www/html/one.ru"
</VirtualHost>

<VirtualHost 91.15.128.29:80>
ServerName two.ru
ServerAlias two.ru
DocumentRoot "/var/www/html/two.ru"
</VirtualHost>

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)
P
pcdesign, 2019-06-29
@pcdesign

https://serverfault.com/questions/900757/how-can-i...
https://serverfault.com/questions/607137/restrict-...

C
CityCat4, 2019-06-29
@CityCat4

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