apache
Password protecting website without using .htaccess
Do you host your own website and since you have control of the /etc/apache2/conf.d directory you would rather not enable .htaccess usage?
Now you wonder how do I password protect a directory without having a .htaccess file in the directory. You actually use the same options etc you would use in a .htaccess. So here is a sample configuration file which requires authentication for the directory /var/www/stats
Here is the location of the file below:
/etc/apache2/conf.d
<Directory /var/www/stats>
AuthType Basic
AuthName “Statistic Tracker”
AuthUserFile /etc/apache2/htpasswd.setup
Require valid-user
</Directory>
To create the required htpasswd file (with the name above) do:
sudo htpasswd -c /etc/apache2/htpasswd.setup username
Now you will have to reset apache:
sudo /etc/init.d/apache2 restart
I will be adding this to my Wiki later
Search
Powered by
Tags
10.3 11.0 11.1 apache bash beta bootchart codeweavers compiz drivers emerald emulation esx fat ass tomato man filesystems flash fonts gnome grub ibm kde kde4 kernel knoppix linux lotus notes lvm Microsoft nomad nvidia openoffice opensuse performance repositories review scripting security tech tutorial ubuntu user management VMWare windows wine workstationArchives
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- February 2008
- January 2008
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
Ben Kevan's Blog
- Connecting to Linux via RDP using NOMAD on openSUSE 11.1
- Red Hat (RHT) Profits Soar, is Novell (NOVL) Next?
- Dropping KDE 3.5 for openSUSE 11.2 isn’t really a bad thing
- 5 Days on openSUSE 11.1 was an early X-Mas present
- Unexpected Downtime
- Amarok 2.0 Final Released - Shipping with openSUSE 11.1
- PCLinuxOS 2009 Beta 2 - Review, Thoughts and Screenshots
- Opera 10.0 Alpha 1 on openSUSE 11.1 - Review
- Ding Dong the Emeralds Back Compiz
- 11.1 Build Service Repositories being Built