LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-29-2010, 12:56 PM   #1
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Rep: Reputation: 31
HTTP auth from outside + allow from local


Been a while but have a few scripts that need to hit a website that's local to that network, but also a public site. Currently there is an .htaccess in that folder with this lockdown;


AuthType Basic
AuthName "Restricated"

Require valid-user

Now, can I break that somehow and say (here is my english translation)

<outside>
AuthType Basic
AuthName "Restricted"
Require valid-user
</outside>

<inside>
Allow from all
</inside>

Right now I try to curl from a local (or any) machine, this is what comes back;

<h1>Authentication required!</h1>
This server could not verify that you are authorized to access
the URL "/".
You either supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

So what's the easiest way around this to allow the local to hit the site... thanks.

Last edited by sir-lancealot; 07-29-2010 at 01:07 PM.
 
Old 07-29-2010, 01:25 PM   #2
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Original Poster
Rep: Reputation: 31
Sorry, was actually easier than I though (can I thank myself)

But just so anyone else needs it (can't believe I actually didn't read enough, but it was this simple)


Order deny,allow
Deny from all
AuthName "Restricted"
AuthUserFile /dev/null (were using a perl auth module which is why this was put here like this)
AuthType Basic
Require valid-user
Allow from myip
Satisfy Any
 
  


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
http auth question razzera Debian 1 07-04-2010 10:18 AM
http auth question razzera Debian 3 06-04-2010 04:37 PM
Apache http auth. razzera Linux - Security 6 01-27-2010 06:32 AM
Swaret through http proxy+auth securedigital Slackware 8 09-30-2008 10:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:53 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