Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th March 2007, 19:40
kalikoder kalikoder is offline
Junior Member
 
Join Date: Feb 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default .htaccess functionality does not work

Hi-

I am running ISPconfig on Suse Linux 10.1 with three virtual hosts setup to share the same ip. Everything is working very well, except the .htaccess functionality in any of the sites. Whenever I try to use a PHP script that uses .htaccess file in its directory, I get a 500 internal server error. No matter which site.

I have browsed the forum, and researched this issue. Following is my error log file from one of the sites:
[Wed Mar 07 11:41:40 2007] [alert] [client 142.xx.xx.xxx] /srv/www/web7/web/blogs/.htaccess: Options not allowed

I believe that the issue is about .htaccess not being allowed globally or something. Following is an excerpt from my /etc/apache2/httpd.conf file:
<Directory /srv/www/*/web>
Options +Includes -Indexes
AllowOverride None
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>

In the above I have tried changing "AllowOverride None" to "AllowOverride All" and restarted apache, but it makes no difference

Please let me know if you want to see my /etc/apache2/vhosts/Vhosts_ispconfig.conf file, it currently does not have any <Directory> </Directory> sections.

Can you please point me in the right direction.. is there a howto telling how to get the .htaccess functionality working on ISPConfig. Please let me know if you need any more information.

Thanks in advance
Reply With Quote
Sponsored Links
  #2  
Old 9th March 2007, 17:18
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Please change it to
Code:
<Directory /srv/www/*/web>
Options +Includes -Indexes
#AllowOverride None
#AllowOverride Indexes AuthConfig Limit FileInfo
AllowOverride All
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 9th March 2007, 22:09
kalikoder kalikoder is offline
Junior Member
 
Join Date: Feb 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the reply Falko. I am not very good on how the .htaccess works exactly, but just wanted to ask you if there are any security risks associated with doing a "AllowOverride All" , can a hacker take advantage of this and compromise the system in some way..

Thanks again
Reply With Quote
  #4  
Old 10th March 2007, 12:16
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Well, it would allow a customer that does not pay for PHP to enable PHP for his web site (if he knows about .htaccess). The same goes for other features. He might even be able to switch off PHP Safe Mode, and that would be a security risk.

But you can take a look http://httpd.apache.org/docs/2.0/mod...reference.html
It will tell you what you need to put behind AllowOverride to get your directives working.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 11th April 2007, 11:21
teves teves is offline
Senior Member
 
Join Date: Oct 2006
Posts: 149
Thanks: 27
Thanked 13 Times in 10 Posts
Default

Hello,

I have a similar problem with a php knowledgebase script (kbpublisher).

What I'd like to know is: is it possible to set the AllowOverride options in the vhosts config file per web?
I'd like to be able to allow the usage of certain .htaccess options in only one web.

Thank you,
regards, Tom
Reply With Quote
  #6  
Old 12th April 2007, 16:29
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Sure, you can add something like

Code:
<Directory /path/to/directory>
AllowOverride All
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>
in the Apache Directives field of a web site in ISPConfig.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 12th April 2007, 17:47
teves teves is offline
Senior Member
 
Join Date: Oct 2006
Posts: 149
Thanks: 27
Thanked 13 Times in 10 Posts
Default

Aaah! Cool!

But what path do I need to enter into the directory tag of the htaccess file? The absolute path to the web in question, eg. <directory /srv/www/web123/web > ?

And do I have to restart apache after changing the apache directive field of a web?
Reply With Quote
  #8  
Old 13th April 2007, 08:29
teves teves is offline
Senior Member
 
Join Date: Oct 2006
Posts: 149
Thanks: 27
Thanked 13 Times in 10 Posts
 
Default

Hello,

no need to answer, I found it out myself in the meantime. And it works great! Thank you very much for the hint!

To point it out for others with the same problem:
The path must be relative to the /srv/www/webXX/web folder (at least on my Suse 10.1 / ISPConfig 2.28 Server).
Another thing one needs to know is that it takes a bit of time for the changes in the Apache Directives field to take effect.

regards, Tom
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
eGroupWare Install crudolphy General 28 5th June 2007 19:09
wordpress MU and ISPconfig .htaccess isues palkat General 4 18th October 2006 11:57
.htaccess login challenge broken with mod_rewrite ozonblue Installation/Configuration 2 13th September 2006 10:09
.htaccess never executed galmiche Server Operation 2 4th June 2006 21:44
No .htaccess in automatic backup? tron Installation/Configuration 3 22nd March 2006 18:03


All times are GMT +2. The time now is 17:57.


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