Search squid archive

Re: Reverse Proxy with .htaccess - does it work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* On 23/04/07 17:42 +0200, Kinkie wrote:
| On 4/23/07, Odhiambo WASHINGTON <wash@xxxxxxxxxxxx> wrote:
| >I have a reverse proxy setup with Squid-2.6STABLE12. Both Squid and
| >Apache reside on the same box.
| >
| >For a typical site on the backend, I have this directive in squid.conf:
| >
| ><cut>
| >cache_peer 127.0.0.1 parent 80 0 originserver no-query no-digest name=www3
| >cache_peer_domain www3 domainname.tld
| ></cut>
| >
| >There is a directory under DocumentRoot for domainname.tld which I would
| >like to restrict access to (.htaccess style), so that only authenticated
| >users can go in.
| >
| >However, a typical configuration for such a restriction, which works for
| >native Apache, fails to work for me in my reverse proxy setup.
| 
| Can you explain with greater detail in what ways it is failing?
| Your setup doesn't seem so strange or problematic to me..


Hi Kinkie,

Okay. I mentioned that Apache and Squid are on the same machine so httpd.conf
has this directive:

Listen 127.0.0.1:80

Here is the config for one of the websites for which I am doing reverse proxy:

<VirtualHost 127.0.0.1:80>
        ServerAdmin webmaster@xxxxxxxxxxxx
        DocumentRoot /usr/local/www/data/domainname.tld
        ServerName domainname.tld
        ServerAlias www.domainname.tld
        ErrorLog /var/log/domainname-error_log
        CustomLog /var/log/domainname-access_log common
        <Directory /usr/local/www/data/domainname.tld/>
                Order Allow,Deny
                Allow from all
        </Directory>
<Directory /usr/local/www/data/domainname.tld/phpmyadmin4suntra/>
  Options Indexes Includes MultiViews
  AuthType Basic
  AuthName "SIB Admin Centre...Authentication required"
  AuthUserFile /usr/local/www/data/domainname.tld/.fauxpasswd
  Order Allow,Deny
  Allow from all
  ErrorDocument 402 http://www.domainname.tld/apache_error/error401.html
  <LIMIT GET POST>
   Require valid-user
  </LIMIT>
 </Directory>
</VirtualHost>

And my squid.conf entry is as before. I have tried adding login=PASS, but still
authentication does not work as expected.

I am still missing something, and I'd hate if it's rather obvious ;)


-Wash

http://www.netmeister.org/news/learn2quote.html

DISCLAIMER: See http://www.wananchi.com/bms/terms.php

--
+======================================================================+
    |\      _,,,---,,_     | Odhiambo Washington    <wash@xxxxxxxxxxxx>
Zzz /,`.-'`'    -.  ;-;;,_ | Wananchi Online Ltd.   www.wananchi.com
   |,4-  ) )-,_. ,\ (  `'-'| Tel: +254 20 313985-9  +254 20 313922
  '---''(_/--'  `-'\_)     | GSM: +254 722 743223   +254 733 744121
+======================================================================+

Where there's a will, there's an Inheritance Tax.

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux