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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th April 2009, 16:44
gkovacs gkovacs is offline
Member
 
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 47
Thanks: 5
Thanked 0 Times in 0 Posts
Default NEW ERROR: RewriteEngine not allowed here

I have a couple of Joomla sites that have been using a .htaccess based URL rewrite, running under ISPConfig 3. Recently these sites stopped working if the following .htaccess file is in place:

Code:
RewriteEngine On
DirectoryIndex index.php
RewriteBase /

RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
The site throws an Internal Server Error, and puts this in the error.log:
Code:
.../web/.htaccess: RewriteEngine not allowed here
The same thing happens if I put this .htaccess file in an empty folder and try to open it in a browser.

I've updated ISPConfig to 3.0.1 a couple of days ago, but nothing has been changed since, and this error only started to happen today.
What could have gone wrong?

Last edited by gkovacs; 17th April 2009 at 16:48.
Reply With Quote
Sponsored Links
  #2  
Old 18th April 2009, 13:20
gkovacs gkovacs is offline
Member
 
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 47
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Since yesterday, more sites using mod_rewrite in a .htaccess have stopped working.

I have nailed down the problem. If this is present in a site's vhost file, mod_rewrite stops working:

Code:
<Directory /var/www/XXX.hu/web>
        Options FollowSymLinks
        AllowOverride Indexes AuthConfig Limit
        Order allow,deny
        Allow from all
</Directory>
If I manually change it to

Code:
<Directory /var/www/XXX.hu/web>
        Options All
        AllowOverride All
        Order allow,deny
        Allow from all
</Directory>
then it works. However, ISPConfig restores the previous state at any modification I do, so there is currently no way to leave these sites in a working state.

Last edited by gkovacs; 18th April 2009 at 16:13.
Reply With Quote
  #3  
Old 18th April 2009, 15: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

You can try to add your custom directives to the Apache Directives field on the Options tab of that 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
  #4  
Old 18th April 2009, 15:58
gkovacs gkovacs is offline
Member
 
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 47
Thanks: 5
Thanked 0 Times in 0 Posts
Default

I can try, but it will surely not work. If I add these two lines in the options, Apache fails to restart and rejects this config:

Code:
root@ispconfig:/var/clients/clientXXX/XXX.hu/web# /etc/init.d/apache2 reload
Syntax error on line 45 of /etc/apache2/sites-enabled/XXX.hu.vhost:
AllowOverride not allowed here
   ...fail!
So I'm not sure what I'm supposed to add.

But more importantly, do you have any idea why the latest ISPConfig fux up the vhosts files so no one is able to use mod_rewrite anymore?

Last edited by gkovacs; 18th April 2009 at 16:13.
Reply With Quote
  #5  
Old 19th April 2009, 16:03
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

You must add this inside <Directory></Directory> directives.
__________________
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
  #6  
Old 19th April 2009, 19:52
mgibson mgibson is offline
Junior Member
 
Join Date: Apr 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Falko,

I'm also having similar issues to gkovacs.

Falko, in your response to "You can try to add your custom directives to the Apache Directives field on the Options tab of that web site in ISPConfig. "

Is there a way to add these in as default so we dont have to add custom directives. If so, which file do we need to edit?

Kind Regards,

Mark.
Reply With Quote
  #7  
Old 20th April 2009, 12:00
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

Quote:
Originally Posted by mgibson View Post
Is there a way to add these in as default so we dont have to add custom directives. If so, which file do we need to edit?
No, that's not possible.
__________________
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
  #8  
Old 20th April 2009, 12:20
mgibson mgibson is offline
Junior Member
 
Join Date: Apr 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Not possible at all? Or can be possible with a bit of work?

I'm sure alot of ispconfig3 users would appreciate this feature when running CMS such as Drupal or Joomla.

ISPConfig3 has to be writing the directives into the vhost somewhere...

Regards,

Mark.
Reply With Quote
  #9  
Old 20th April 2009, 13:09
gkovacs gkovacs is offline
Member
 
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 47
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
No, that's not possible.
You still didn't answer my question about how and why ISPConfig has changed regarding this matter. It seems to me that ISPConfig did allow mod_rewrite running out of the box, but since the latest update it does not.

1. Why did this change happen? (Just out of curiosity, I'm interested)

2. Why don't you (I presume you are a developer) acknowledge this change? (This seems to affect a lot of people, and will affect a lot more as soon as they modify their config and ISPConfig overwrites their vhost files, so we deserve a clarification)

3. Is it REALLY impossible to add a checkbox to the site config that allows mod_rewrite to run as it did before?

Last edited by gkovacs; 20th April 2009 at 17:54.
Reply With Quote
  #10  
Old 20th April 2009, 13:28
Mogi Mogi is offline
Junior Member
 
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by falko View Post
No, that's not possible.
You have to be kidding.

ISPConfig has arbitrarily removed the ability to use rewrites?

Seriously?

Have you never heard of WordPress??

Dozens and dozens (and it will be hundreds soon enough) of WP blogs are going from working perfectly to 500 server error, just because you decided to *remove*the*ability*to*use*rewrites*??

*What* were you *thinking*?

Y'know, for the first time ever, I'm now lost for words.

The boxes are not yours that you can arbitrarily decide who can and who can't use rewrite in .htaccess.

When will this be fixed? I'm sick of being screamed at by WP users with broken sites.
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
Host is not allowed to connect to this MySQL server'? mcroteau105 HOWTO-Related Questions 5 7th September 2009 12:52
ftp is very slow and asks for user/passwd continuously chico58 Installation/Configuration 7 8th October 2008 12:43
how to enable Mod Rewrite AngelDrago Installation/Configuration 9 10th August 2007 23:20
Ispconfig and Virtuemart shajazzi Installation/Configuration 7 21st February 2006 20:25
Number of allowed domains times 2? cstone Installation/Configuration 9 11th October 2005 02:06


All times are GMT +2. The time now is 16:29.


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