How do I set IP access / password restrictions in Apache?

Posted by Mouthbreather on Stack Overflow See other posts from Stack Overflow or by Mouthbreather
Published on 2010-03-30T17:51:46Z Indexed on 2010/03/31 7:03 UTC
Read the original article Hit count: 184

I'd like to restrict access to my Rails app (running on Apache/Passenger) to just two IPs, but if the visitor doesn't fall into those two IPs, I would like for him/her to be prompted to enter a password that would allow any user with the proper credentials to access the site from anywhere.

I am new to configuring Apache and would appreciate any hints. Thanks!

© Stack Overflow or respective owner

Related posts about apache

Related posts about .htaccess