LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache directory security (https://www.linuxquestions.org/questions/linux-software-2/apache-directory-security-4175450645/)

Chris E 02-18-2013 07:08 AM

Apache directory security
 
Hi guys

I must be missing something stupid here but I can't figure it out.

I know I can password protect a directory in apache and if I go to http://server.domain.com/directory it prompts for a password, all OK no issues there.

If I access the same directory via IP e.g. http://xx.xx.xx.xx/directory it doesnt ask for a password and lets me straight in.

What am I missing? Is this because my directory isn't inside a virtualhost?

Thanks

acid_kewpie 02-18-2013 07:18 AM

hard to say without seeing any config, but I'd certainly guess initially at a different virtualhost being used to reach it when the IP is not used.

note that when using virtualhosts, the first virtualhost in the list will be used as the default if the hostname doesn't match any other one.

scasey 02-19-2013 06:57 PM

acid kewpie is probably correct, but one should also remember that once a browser instance has authenticated, it won't be prompted a second time.


All times are GMT -5. The time now is 03:46 AM.