Reputation: 1149
I am trying to figure out how i can password protect my entire web directory on my server which is running apache2. I Have got a joomla application running and would like to allow only authorised users to browse to the public dns. I have tried to setup the .htaccess file but have been unsuccessful so far.
Upvotes: 1
Views: 3128
Reputation: 9615
If your server is running cpanel or plesk there is an option to make a folder password protected from the panel interface.
Upvotes: 0
Reputation: 41
Paste this code after it (in new line):
AuthUserFile "/folder/of/your/password/file/.htpasswd" AuthName "Restricted Area" AuthType Basic require valid-user
Find "RewriteEngine On" text in the file
Paste this line after it:
RewriteRule \.htpasswd$ - [F,L]
Do not forget to upload your password file to the folder specified above. In the password file every line can contain one pair of username and password in this format:
username:MD5_encoded_password
Upvotes: 1
Reputation: 86
you can make your htaccess file password protected.
You can also user joomla's user authentication for permission access like registered or administrator.
Upvotes: 1
Reputation: 19733
If there is anyone more experienced out there on this then please correct me if I'm wrong, but password protecting your entire Joomla site using the htaccess file will prevent users from entering your site.
You might be better off looking into some security extensions for Joomla such as Admin Tools, Admin Exile and OSE Anto Hacker (commercial).
For more security extensions, please take a look at the Site security category on JED:
http://extensions.joomla.org/extensions/access-a-security/site-security/site-protection
Also ensure that all folders are set to 755 and files to 644. This can be done manually or can quickly be achieved by Admin Tools.
Hope this helps
Upvotes: 2