Apache: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
(New page: = Allowing .htaccess = To use the .htaccess files with Apache<br> '''/etc/httpd/conf/httpd.conf''' <pre> AllowOverride All </pre> = Default Load Pages = To change the global settings for A...)
 
Line 29: Line 29:
username1:entrypted-password
username1:entrypted-password
username2:entrypted-password
username2:entrypted-password
username2:entrypted-password
username3:entrypted-password
.
.
.
.
</pre>
</pre>
[[Category : Linux]]
[[Category : Linux]]

Revision as of 02:50, 24 October 2008

Allowing .htaccess

To use the .htaccess files with Apache
/etc/httpd/conf/httpd.conf

AllowOverride All

Default Load Pages

To change the global settings for Apache to allow for different default home pages to load edit the file
/etc/httpd/conf/httpd.conf

DirectoryIndex index.html index.htm index.html.var

Creating Passwords

To create a password to access a site/folder you need to create 2 files in the folder location of the WEB site.
The first file is .htaccess and the second file is .htpasswd

.htaccess

AuthUserFile /var/www/html/.htpasswd
AuthName "Title for Password Login Box"
AuthType Basic

<Limit GET>
   require valid-user
</Limit>

.htpasswd

To aquire an encrypted password I have found this site to be quite good.

username1:entrypted-password
username2:entrypted-password
username3:entrypted-password
.
.