![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Web Programming, Web 2.0 and Mashups Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, Flash, HTML, SEO, Mashups and other Web APIs and topics. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| configuration file | iamcool | Shell Programming and Scripting | 5 | 12-27-2007 10:53 AM |
| Extracting data from text file based on configuration set in config file | suparnbector | Shell Programming and Scripting | 3 | 08-10-2007 03:25 AM |
| Apache Configuration issue on Solaris | rahulrathod | SUN Solaris | 1 | 10-21-2005 01:36 AM |
| apache configuration | hachik | UNIX for Advanced & Expert Users | 1 | 10-15-2004 07:23 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Apache Configuration File
I am new in Linux configure Apache. I got few questions to ask. I am will grateful for the help. Thanks.
1) In the Apache Configuration File, where is actually the base for the web tree? 2) I wanted to create a directory (called java) inside the base of the web tree. How am I going to do that? 3) I wanted to make this directory (called java) to be protected. I only allow the user (named glenn) with the password (glenn) to see the contents of the directory (called java). How am I going to do that? I know I need to create a .htaccess file but I don't how to do it. |
|
||||
|
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! |
|
||||
|
This is some straight up homework. No one in their right mind is making a username and password glenn/glenn.
I am a part time Linux instructor, and this is the type of stuff i would have my students do. If it is a legitimate question, then tell us what you tried. Don't just say "I cant do it "Also, you should look at the Apache manual, it's a great reference guide...much better than the traditional man page. There is a how-to in there for authentication, its excellent. just type in "apache docs" in google, and its the first entry. |
![]() |
| Bookmarks |
| Tags |
| apache, configuration file, htaccess, linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|