Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How would I go about only requiring basic auth only for external connections to my localhost?

That is: I run a local version of Apache and I don't want to have to sign in while I'm working locally but if I want to make it available on a public IP/hostname I want it to require Basic Auth.

Thank you!

share|improve this question

migrated from stackoverflow.com Jul 27 '11 at 11:16

This question came from our site for professional and enthusiast programmers.

Apologies, you're quite right. It's just tricky to navigate all the stackexchange sites so I forget which one is most appropriate. –  koorb Jul 26 '11 at 11:50

1 Answer 1

The Apache documentation on Satisfy has an example:

Require valid-user
Allow from 192.168.1
Satisfy Any 
share|improve this answer
Thats amazing. Thought we'd got it. Only thing seems that I can't get it to ask for a password remotely. Require valid-user Allow from 192.168.1 Satisfy Any Just always seems to let me in. –  koorb Jul 26 '11 at 11:48
What is the ip of a typical remote user? What is your ip when you connect? –  Anders Lindahl Jul 26 '11 at 13:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.