How to restrict page access to certain IPs using Apache httpd?

Solution Verified - Updated -

Issue

  • How can you filter or restrict https://x.x.x.x/wp-login.php or https://x.x.x.x/wp-login.php?redirect_to=https%3A%2F%2Fx.x.x.x%2Fwp-admin%2F&reauth=1 pages from being accessed by everyone but only certain allowed IPs?

Environment

  • Red Hat Enterprise Linux (RHEL)
  • Red Hat JBoss Web Server (JWS)
  • Apache httpd

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.