LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-18-2013, 08:08 AM   #1
Chris E
Member
 
Registered: Jun 2008
Location: Berkshire, UK.
Distribution: CentOS
Posts: 31

Rep: Reputation: 2
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
 
Old 02-18-2013, 08:18 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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.
 
Old 02-19-2013, 07:57 PM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 5,271

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache alias and 777 directory security BillKat Linux - Security 5 10-05-2010 11:58 AM
Apache Virtual Hosting security with SuExec: file and directory permissions krasl Linux - Server 2 08-04-2010 09:41 AM
Apache Directory Listing Of NFS Mount, cannot view directory list via apache luqmana Linux - Networking 2 12-19-2005 07:03 AM
apache directory security steve_babbage Linux - Security 1 02-20-2004 02:15 PM
Apache directory security cli_man Linux - Security 2 10-14-2002 06:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration