The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Special Forums > Web Programming, Web 2.0 and Mashups
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 05-17-2009
research3 research3 is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 88
I'm not 100% sure but I think the basic root web directory on red hat is : /var/www/

This can be change in you apache configuration file: /etc/httpd/conf/httpd.conf

DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>


You have to edit this part and change the /var/www/ to you directory


and to you last point -- please run the command :

htpasswd -c /your/directory/.htpasswd glenn glenn

then you have to create a file .htaccess in you web server directory

and paste the following lines in your .htaccess (only change the /your/directory) parameter!

AuthType Basic
AuthName "Authetication"
AuthUserFile /your/derectory/.htpasswd
require valid-user


I hope that's all!