|
||||||
| 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 |
|
|||
|
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?? |
|
|||
|
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 |
|
|||
|
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? |
|
|||
|
It depends on whether you want the access to apply to all of the site.
|
|
|||
|
All I would like to do is restrict access to a sub dir within the htdocs folder
/htdocs/Private |
|
|||
|
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> |
|
|||
|
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. |
|
|||
|
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 | |
|
|