Apache 2, allow from localhost

  • Follow


Hi,

After moving a site (in development) from /var/www to ~/public_html I
am no longer allowed to access it (without loggin in). The
authentication section in .htaccess looks like this:

AuthType Basic
AuthName "Please log in"
AuthUserFile <xxx>
Order deny,allow
Deny from all
Allow from 127.0.0.1 10.0.1
Require valid-user
Satisfy any

If I replace the Allow directive with

Allow from 127.0.0.0/255.0.0.0 ::1/128

(copied from /etc/apache2/sites-available/default) I can access the
site but then I get an internal server error after having uploaded the
site to my web hosting account.

Any ideas?


Regards,

August
0
Reply fusionfile (190) 11/8/2009 3:20:11 PM

On Nov 8, 8:20=A0pm, augustk <fusionf...@gmail.com> wrote:
> Hi,
>
> After moving a site (in development) from /var/www to ~/public_html I
> am no longer allowed to access it (without loggin in). The
> authentication section in .htaccess looks like this:
>
> AuthType Basic
> AuthName "Please log in"
> AuthUserFile <xxx>
> Order deny,allow
> Deny from all
> Allow from 127.0.0.1 10.0.1
> Require valid-user
> Satisfy any
>
> If I replace the Allow directive with
>
> Allow from 127.0.0.0/255.0.0.0 ::1/128
>
> (copied from /etc/apache2/sites-available/default) I can access the
> site but then I get an internal server error after having uploaded the
> site to my web hosting account.
>
> Any ideas?
>
> Regards,
>
> August

Paste the apache logs here...when you access the site..
0
Reply Don 11/11/2009 1:57:54 PM


Don wrote:
> Paste the apache logs here...when you access the site..

OK, with the configuration

AuthType Basic
AuthName "Please log in"
AuthUserFile xxx
Order deny,allow
Deny from all
Allow from 127.0.0.1 10.0.1
Require valid-user
Satisfy any

the following line is written to /var/log/apache2/access.log when the 
login dialog is displayed (on localhost):

::1 - - [13/Nov/2009:10:23:19 +0100] "GET /~august/test/ HTTP/1.1" 401 
365 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.15) 
Gecko/2009102815 Ubuntu/9.04 (jaunty) Firefox/3.0.15"

Nothing is written to /var/log/apache2/error.log.


/August
0
Reply August 11/13/2009 9:30:29 AM

2 Replies
301 Views

(page loaded in 0.062 seconds)

Similiar Articles:













7/28/2012 10:14:39 AM


Reply: