Date: Wed, 20 Feb 2002 21:07:17 -0500 From: Lord Raiden <raiden23@netzero.net> To: "Marius Kirschner" <marius@agoron.com>, "FreeBSD Questions" <freebsd-questions@FreeBSD.ORG> Subject: Re: .htaccess Message-ID: <4.2.0.58.20020220204534.009cf580@pop.netzero.net> In-Reply-To: <019601c1ba5e$1f273580$5ae9b5ce@quasi1>
next in thread | previous in thread | raw e-mail | index | archive | help
Ok, my turn to put in my 2cents and help out here. :) I'm no apache guru on this, but I've done my time around the block. If I'm wrong, someone back me up on this. :) Ok, is the website www.virtualweb.com exist on another server and points to the www.web.com/~joedoe/secure, or is it hosted on the same machine? IF it's on the same machine, you've got something setup in apache wrong that it's trying to see a different .htaccess file. If it's on a different machine, it won't see the .htaccess file at all, so your efforts are pointless. :) Now, on to the second thing. You need the reference you have in the .htaccess file in the secure directory in your .htaccess file in the root directory. You still need your other copy in the secure directory. I've had some situations where this was the only way it worked, other times it worked like it should where the server looks at the .htaccess file in the given directory access, but personally I've only gotten the virtual web references to work if both the root web, in this case www.web.com/joeuser/ and the /secure/ directories have the same info in the .htaccess files. Another thing. Sometimes apache doesn't like direct pathnames, but instead will only work with references like "AuthUserFile www.virtualweb.com/secure/.htpasswd" Had to do that with one of my error documents onetime. Try these ideas. And when you go hacking your .htaccess, remember to make a backup so if you toast something, you got an original to backup on. Learned that one the hard way too. :) Always backup any file you plan to edit, no matter how insignificant. hehe. At 05:29 PM 2/20/02 -0500, Marius Kirschner wrote: >I'm pulling my hair here....can't get .htaccess to work properly. > >If I do http://www.web.com/~joedoe/secure it WORKS > >But if I have a virtual web site's document root point to >/usr/home/joedoe/html and do a > >http://www.virtualweb.com/secure it DOESN'T work! > >The .htaccess and .htpasswd files are in the /usr/home/joedoe/secure >directory, but if I go there using the virtual domain name it by-passes >the .htaccess file. > >The .htaccess looks like that: > >AuthUserFile /usr/home/joedoe/html/secure/.htpasswd >AuthName "Private" >AuthType Basic >require user vippy >Satisfy any > >Any clues? Thanks, > > ---Marius > > > > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4.2.0.58.20020220204534.009cf580>