#1  
Old 17th May 2007, 02:49
lifeisboost lifeisboost is offline
Senior Member
 
Join Date: Feb 2006
Posts: 122
Thanks: 0
Thanked 2 Times in 2 Posts
Default .htaccess does not work

okay we built a new server i followed the fc5 install and followed the how too on moving the sites. but nw my .htaccess for authentication does not work. can some one please help this is urgent that i need this working. here is what is in my .htaccess file

AuthName "Restricted area, please provide your login information."
AuthType Basic
AuthUserFile /home/www/web1/web/******/.htpasswd
AuthGroupFile /dev/null


i also had directorys limited by IP address. this does not work Either

Last edited by lifeisboost; 17th May 2007 at 03:46.
Reply With Quote
Sponsored Links
  #2  
Old 17th May 2007, 03:48
bschultz bschultz is offline
Senior Member
 
Join Date: Jul 2006
Posts: 222
Thanks: 11
Thanked 10 Times in 10 Posts
Default

In the ISPConfig panel, you need to set the Apache Directive for each site to allow an .htaccess file like this:
Quote:
<Directory "/var/www/web1/web">
Options FollowSymLinks
AllowOverride All
</Directory>
Keep in mind that the paths above are Debian Etch...you may need to change the path for your system. Also, it's a good idea to keep the password file out of the web root.
Reply With Quote
The Following User Says Thank You to bschultz For This Useful Post:
mtuser (22nd May 2007)
  #3  
Old 17th May 2007, 03:50
lifeisboost lifeisboost is offline
Senior Member
 
Join Date: Feb 2006
Posts: 122
Thanks: 0
Thanked 2 Times in 2 Posts
Default

well this is what i have in my httpd.conf. do i still ned to add that into the site directvies of isp?

<Directory /var/www/*/web>
Options +Includes -Indexes
AllowOverride Indexes AuthConfig Limit FileInfo
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>


i have also tried this combo

<Directory /var/www/*/web>
Options +Includes -Indexes
#AllowOverride Indexes AuthConfig Limit FileInfo
#AllowOverride Indexes AuthConfig Limit FileInfo
AllowOverride All
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>
Reply With Quote
  #4  
Old 17th May 2007, 04:03
bschultz bschultz is offline
Senior Member
 
Join Date: Jul 2006
Posts: 222
Thanks: 11
Thanked 10 Times in 10 Posts
Default

I think you need to have this:

Quote:
<Files ~ "^\.ht">
Deny from all
</Files>
IN the .htaccess file...that way website viewers can't see the contents of the .htaccess file. When you put it in the http.conf file, I THINK that you are disabling the file.

Don't hold me to this...but I think I'm right.
Reply With Quote
  #5  
Old 17th May 2007, 12:28
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
 
Default

In your /etc/apache2/apache2.conf file you can disable/enable the global setting for using .htaccess files on your system.
With these lines within /etc/apache2/apache2.conf these global settings are turned off.

AccessFileName .htaccess

<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>


To make the use of .htaccess files possible for that particular site, you can add the following lines in ISPConfig within the Apache directives field of the website:

<Directory "/var/www/webX/web">
Options FollowSymLinks
AllowOverride All
</Directory>

Exactly how bschultz mentioned before.

For Authentication, you can create something like this:

AuthType Basic
AuthName "Members Only"
AuthUserFile /var/www/www.example.com/.htpasswd
<limit GET PUT POST>
require valid-user
</limit>
__________________
Hans

MrHostman | Master in managed hosting
Reply With Quote
Reply

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess functionality does not work kalikoder Installation/Configuration 7 13th April 2007 08:29
can't make work joomla + sef + .htaccess bochenn General 9 4th April 2007 13:47
wordpress MU and ISPconfig .htaccess isues palkat General 4 18th October 2006 11:57
ISPConfig and .htaccess ionut89 Feature Requests 1 17th October 2006 17:45
.htaccess login challenge broken with mod_rewrite ozonblue Installation/Configuration 2 13th September 2006 10:09


All times are GMT +2. The time now is 02:45.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.