Koozali.org: home of the SME Server

Password protect a folder?

Offline mflammia

  • *
  • 12
  • +0/-0
Password protect a folder?
« on: May 14, 2011, 11:08:13 PM »
Hi,

Please excuse me if there is an obvious answer - have done a little digging around and not come across anything that allows me to do this on the actual folder itself? Think the only possible way is to do this via Apache, which I am still researching?..

My reasons are that I would like to password protect my administrator folder in Joomla, for the purpose of adding some security.

Any ideas how I could do this?

Many thanks.
« Last Edit: May 14, 2011, 11:20:15 PM by mflammia »

Offline mflammia

  • *
  • 12
  • +0/-0
Re: Password protect a folder?
« Reply #1 on: May 15, 2011, 12:28:31 AM »
Managed to work this out so posting my findings....

The following links where really useful:
http://www.elated.com/articles/password-protecting-your-pages-with-htaccess/

http://wiki.contribs.org/Htaccess

Follow the intructions in the first link, but if like me it may not have worked this was because I already use a template as laid out here http://wiki.contribs.org/Talk:Web_Application_Redirect_Tutorial

So all I needed to do was append the code to the existing template 20IbayContent.txt in the directory /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts.

With the below, where /etc/passwordfilename is the location of my .ht password file:

Code: [Select]
<Directory /opt/joomla/administrator>
AuthUserFile /etc/passwordfilename
AuthGroupFile /dev/null
AuthName "My Site Security Group"
AuthType Basic
<Limit GET>
order deny,allow
require valid-user
</Limit>
</Directory>







Offline odmen01

  • *
  • 10
  • +0/-0
Re: Password protect a folder?
« Reply #2 on: May 24, 2011, 09:45:26 PM »
Hey those link were really useful, but I am just half way there.............trying the same thing for my site too.
hello