Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 07-29-2010, 01:56 PM   #1
Registered: Aug 2007
Posts: 339

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)

AuthType Basic
AuthName "Restricted"
Require valid-user

Allow from all

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 02:07 PM.
Old 07-29-2010, 02:25 PM   #2
Registered: Aug 2007
Posts: 339

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


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

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

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