LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 07: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, 07:18 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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, 06:57 PM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
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



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 10:58 AM
Apache Virtual Hosting security with SuExec: file and directory permissions krasl Linux - Server 2 08-04-2010 08:41 AM
Apache Directory Listing Of NFS Mount, cannot view directory list via apache luqmana Linux - Networking 2 12-19-2005 06:03 AM
apache directory security steve_babbage Linux - Security 1 02-20-2004 01:15 PM
Apache directory security cli_man Linux - Security 2 10-14-2002 05:40 PM

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

All times are GMT -5. The time now is 06:23 AM.

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