Apache2: Restrict Certain IPs

Yesterday, I've had some task to make restriction to some web apps.

It's use Apache2 as web service. Unfortunately, I bit confused about the restriction setup because I often used NGINX as web service.

Then, I knew that some syntax configuration are different even just between minor version.

# Apache 2.2

order deny,allow
allow from
allow from
deny from all

# Apache 2.4

Require ip
Require ip

Don't forget about the required Apache modules. I will wrote about this later.

*also, the order syntax are different between deny,allow and allow,deny . smh.