Monday, June 14, 2010

Re: Getting .htpasswd protection to work

Actually, you can use .htaccess for http authentication on windows
machines; you just need to be running Apache or one of the few non-
Apache web servers that mimic this functionality. I would recommend
switching to a web hosting service based on *nix/Apache web servers--
especially if you're developing in PHP. Unless you're developing in
ASP or using some other Windows-exclusive technology, there's no
benefit to using a Windows/IIS-based web host. You'll have less
incompatibility issues, more features, and more freedom with a *nix/
Apache-based web host, which usually come with shell accounts.
DreamHost is a good option. They're likely to be just as cheap as
Network Solutions, if not cheaper, and they have great support (and
aren't involved in any nasty business like Network Solutions).

And if you decide in the future to switch to an Apache-based web host,
I would recommend using digest authentication unless you're going to
be doing everything over an https connection. Pretty much all web
browsers except for Lynx support digest authentication now, so there's
no reason to use basic authentication, which is antiquated and not
secure. It's just as easy to set up digest authentication (you just
use htdigest instead of htpasswd).

On Jun 14, 8:27 pm, Jeff <jhull...@gmail.com> wrote:
> Hi Andy,
>
> Thanks again for the help.  It turns out that because my server
> (hosted by GoDaddy) was running on Windows, I was not able to
> use .htaccess/.htpasswd authentication.  In addition, as you
> mentioned, I did not have the server's full path, which GoDaddy
> provided me.  I will have to keep that "echo __FILE__;" trick in my
> book though.
>
> Thanks.
> Jeff
>
> On Jun 2, 12:10 am, Andy Dirnberger <andy.dirnber...@gmail.com> wrote:
>
> > While that may be your FTP user's full path, it most likely isn't your
> > server's full path. Try putting a file in webroot with the line:
> > echo __FILE__;
>
> > For example, putting that line in a file called path.php will probably
> > give you /full/path/to/app/webroot/path.php rather than just /app/
> > webroot/path.php.
>
> > On Jun 1, 11:16 pm, Jeff <jhull...@gmail.com> wrote:
>
> > > Hi Andy,
>
> > > Actually that is my full path.  At least when I FTP to my server,
> > > immediately in the root directory "/" is the app folder.  Is there
> > > anything else that could be wrong?
>
> > > Thanks
>
> > > On May 12, 9:20 pm, Andy Dirnberger <andy.dirnber...@gmail.com> wrote:
>
> > > > You need to use /the/full/path/to/app/.htpasswd.
>
> > > > On May 12, 11:17 pm, Jeff <jhull...@gmail.com> wrote:
>
> > > > > Hi, I have the following in my /app/webroot/.htaccess file, as well as
> > > > > a matching .htpasswd file in the correct directory per multiple online
> > > > > how-to's, but my password protection is not working.  Can someone tell
> > > > > me what I am doing wrong?
>
> > > > > ****/app/webroot/.htaccess****
>
> > > > > AuthUserFile /app/.htpasswd
> > > > > AuthName "Restricted Area"
> > > > > AuthType Basic
> > > > > require valid-user
>
> > > > > <IfModule mod_rewrite.c>
>
> > > > >         RewriteEngine On
> > > > >         RewriteCond %{REQUEST_FILENAME} !-d
> > > > >         RewriteCond %{REQUEST_FILENAME} !-f
> > > > >         RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
>
> > > > > </IfModule>
>
> > > > > I saw one tutorial that said I needed to find httpd.conf or something
> > > > > to that effect, but I don't see anything.  Maybe this config file
> > > > > doesn't exist with the Cake setup....
>
> > > > > Any help is GREATLY appreciated.
>
> > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpotherswiththeir CakePHP related questions.
>
> > > > > You received this message because you are subscribed to the Google Groups "CakePHP" group.
> > > > > To post to this group, send email to cake-php@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpotherswith their CakePHP related questions.
>
> > > > You received this message because you are subscribed to the Google Groups "CakePHP" group.
> > > > To post to this group, send email to cake-php@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate