Go Back   openSUSE Forums > Archives > SF Archives > ARCHIVES - Network/Internet
Forums FAQ Members List Search Today's Posts Mark Forums Read


ARCHIVES - Network/Internet Questions regarding network or Internet configuration and use in SUSE Linux

 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 19-Apr-2007, 13:38
colors76
Guest
 
Posts: n/a
Default

Hello,

I am having dificulties configuring the .htaccess file from Suse Enterprise Version 10.
I successfuly created the htacces file within the directory that I would like to restrict access. Also, successfuly created the htpasswd file that contains the username and password of the indidual that is permiited to access the restricted directory. However, I cannot identify where or which line to edit within the httpd.conf file from the apache folder.

The following is the only lines that I can see that are relivant to editing the htaccess from the httpd.conf

# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>

Generaly, I should be looking for a line that is bellow the .htaccess area and reads " AllowOverride None" change to "AllowOverride AuthConfig".

Any ideas??
  #2 (permalink)  
Old 19-Apr-2007, 18:16
ken_yap
Guest
 
Posts: n/a
Default

The option to enable is AllowOverride within the scope where you want it to be active, .e.g. inside a <Directory>...</Directory>

For the password file, the required directive is AuthUserFIle.

See here for a tutorial:

http://httpd.apache.org/docs/2.2/howto/htaccess.html
  #3 (permalink)  
Old 19-Apr-2007, 23:34
colors76
Guest
 
Posts: n/a
Arrow

Thanks ken_yap,

I can only find one scope of <Directory/></Directory within the httpd.conf file.

#forbid access to the entire filesystem by default

<Directory/>
Options None
AllowOverride None
Order Deny,allow
Deny from all
</Directory>

Do I need to edit the above or do I have to create a new scope like you may have suggested?
  #4 (permalink)  
Old 19-Apr-2007, 23:56
ken_yap
Guest
 
Posts: n/a
Default

It depends on whether you want the access to apply to all of the site.
  #5 (permalink)  
Old 20-Apr-2007, 00:20
colors76
Guest
 
Posts: n/a
Default

All I would like to do is restrict access to a sub dir within the htdocs folder

/htdocs/Private
  #6 (permalink)  
Old 20-Apr-2007, 01:04
ken_yap
Guest
 
Posts: n/a
Default

Then you need to create a scope for your directory. A good place would be in a file in /etc/apache2/conf.d/something.conf

<Directory /srv/www/htdocs/Private>
...
</Directory>
  #7 (permalink)  
Old 20-Apr-2007, 09:18
colors76
Guest
 
Posts: n/a
Default

It worked.

You weren't required to create a additional scope for directory restrictions with previous versions of Apache. All configuration was applied within the httpd.conf file.

Thanks your all your help ken_yap.

Very much appreciated.


  #8 (permalink)  
Old 20-Apr-2007, 09:25
ken_yap
Guest
 
Posts: n/a
Default

You can create as many scopes as you want/need to separate different parts of your web site in Apache. It's a good thing to modularise the configuration, and have auxiliary config files in conf.d, even though it is equivalent to putting everything in the main httpd.conf file.
 

Bookmarks

Thread Tools
Display Modes

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




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2