The UNIX and Linux Forums  

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



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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-17-2009
newlinuxuser newlinuxuser is offline
Registered User
  
 

Join Date: May 2009
Posts: 3
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.
  #2 (permalink)  
Old 05-17-2009
research3 research3 is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 88
On which operation system are you installed the Apache?
  #3 (permalink)  
Old 05-17-2009
newlinuxuser newlinuxuser is offline
Registered User
  
 

Join Date: May 2009
Posts: 3
I am using Red Hat Linux. Does it matters?
  #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!
  #5 (permalink)  
Old 05-17-2009
Gee-Money Gee-Money is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 48
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.
  #6 (permalink)  
Old 05-19-2009
pupp's Avatar
pupp pupp is offline Forum Staff  
cap_10hdx 1
  
 

Join Date: Feb 2008
Location: Jersey Shore
Posts: 553
closing thread on grounds of homework questions.
Closed Thread

Bookmarks

Tags
apache, configuration file, htaccess, linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:26 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0