RedirectMatch gone instruction

#1
The following rules does not work at Litespeed:

RedirectMatch gone ^.*\.(sql|log|conf)$
RedirectMatch gone VERSION.*

Is it a bug or should we use different constructions(as far as I know these rules works just fine in the Apache)?
 
#3
Where did you put those configuration?
It works in a .htaccess in our lab.
Need more detail to reproduce the problem.
As it was mentioned by bender there is a bug. Redirect gone VERSION.* and RedirectMatch gone VERSION.* expressions in the .htaccess causes infinite redirect loop.

I have commented these rules out and now it is ok. But we need a solution.
 
#4
Here is the Web Server error log:

2009-02-17 10:13:11.845 [INFO] [HTAccess] Updating configuration from [/%PATH%/httpdocs/.htaccess]
2009-02-17 10:13:11.845 [WARN] [HTAccess] [/%PATH%/httpdocs/.htaccess:32] Redirect URL [/upgrade] does not fall inside current context [/%PATH%/httpdocs/], ignore!
2009-02-17 10:13:11.845 [WARN] [HTAccess] [/%PATH%/httpdocs/.htaccess:35] Redirect URL [/skin1_original] does not fall inside current context [/%PATH%/httpdocs/], ignore!
2009-02-17 10:13:11.845 [WARN] [HTAccess] [//%PATH%/httpdocs/.htaccess:38] Redirect URL [/sql] does not fall inside current context [/%PATH%/httpdocs/], ignore!
2009-02-17 10:13:11.845 [WARN] [HTAccess] [/%PATH%/httpdocs/.htaccess:41] Redirect URL [/shipping] does not fall inside current context [/%PATH%/httpdocs/], ignore!
2009-02-17 10:13:11.845 [WARN] [HTAccess] [/%PATH%/httpdocs/.htaccess:44] Redirect URL [/.pgp] does not fall inside current context [/%PATH%/httpdocs/], ignore!
2009-02-17 10:13:11.845 [WARN] [HTAccess] [/%PATH%/httpdocs/.htaccess:45] Redirect URL [/.pgp.def] does not fall inside current context [/%PATH%/httpdocs/], ignore!
2009-02-17 10:13:11.845 [WARN] [HTAccess] [/%PATH%/httpdocs/.htaccess:48] Redirect URL [/tmp] does not fall inside current context [/%PATH%/httpdocs/], ignore!
2009-02-17 10:13:11.845 [WARN] [HTAccess] [/%PATH%/httpdocs/.htaccess:49] Redirect URL [/var] does not fall inside current context [/%PATH%/httpdocs/], ignore!
2009-02-17 10:13:11.845 [WARN] [HTAccess] [/%PATH%/httpdocs/.htaccess:54] Redirect URL [/shop] does not fall inside current context [/%PATH%/httpdocs/], ignore!
I have replaced the actual server path with /%PATH%/.

And here is some rules from the .htaccess:

RedirectMatch 301 VERSION.*
RedirectMatch 301 COPYRIGHT.*
RedirectMatch 301 INSTALL.*
RedirectMatch 301 NEW.*
RedirectMatch 301 README.*
RedirectMatch 301 UPGRADE.*
 
#7
What should this directive do?
To me, it should have no effect as there is no target URL specified.
Never mind.

I have found the issue. The redirect loop was caused by the following configuration file:

/etc/httpd/conf.d/zzz_php_openbasedir.conf:
<DirectoryMatch "^/var/www/vhosts/(.*)/httpdocs">
php_admin_value open_basedir none
</DirectoryMatch>
I had to comment out the DirectoryMatch braces and currently our server works fine.

So in the result is:

/etc/httpd/conf.d/zzz_php_openbasedir.conf:
#<DirectoryMatch "^/var/www/vhosts/(.*)/httpdocs">
php_admin_value open_basedir none
#</DirectoryMatch>
Please, let me know the cause of this issue. Your attention is appreciated.
 
#8
Any update?

We need a solution and very unhappy with this situation. And as an addition I want to mention that construction does not work at all:

#<DirectoryMatch "^/var/www/vhosts/(.*)/httpdocs">
php_admin_value open_basedir none
#</DirectoryMatch>
Looking forward to your reply.
 
#9
I have been waiting for at least 12 hours and I haven't got any response from you guys.

We have a lot of complaint from our customers! It is very disappointing thing!
 
#10
An as addition I want to say that we are extremely loosing our sales!

Currently we are considering an opportunity to choose another Web Server solution because of huge delays and troubles. I wonder that a simple configuration construction causes a huge problems!
 

mistwang

LiteSpeed Staff
#11
LiteSpeed pre-compile <location...> <Directory...> directives, this <directoryMatch ...> directive is intended to match document root directory of all web sites, so it will match all requests and causes other "...Match" directives being ignored as LiteSpeed always use the first match.

The solution is to treat this as a special case in LiteSpeed.

Are you using plesk? Which version?
Does /etc/httpd/conf.d/zzz_php_openbasedir.conf belong to the default template? or added manually?

Does your patch to <DirectoryMatch...> configuration work or not?
 
#13
LiteSpeed pre-compile <location...> <Directory...> directives, this <directoryMatch ...> directive is intended to match document root directory of all web sites, so it will match all requests and causes other "...Match" directives being ignored as LiteSpeed always use the first match.

The solution is to treat this as a special case in LiteSpeed.

Are you using plesk? Which version?
Does /etc/httpd/conf.d/zzz_php_openbasedir.conf belong to the default template? or added manually?

Does your patch to <DirectoryMatch...> configuration work or not?
Configuration file '/etc/httpd/conf.d/zzz_php_openbasedir.conf' was created manually to disable 'open_basedir'. Yes we have using Plesk(different version of branch 8).

Yes, these configuration lines works, but if someone use RedirectMatch in his webroot he'll receive Internal server error.
 
#14
Configuration file '/etc/httpd/conf.d/zzz_php_openbasedir.conf' was created manually to disable 'open_basedir'. Yes we have using Plesk(different version of branch 8).

Yes, these configuration lines works, but if someone use RedirectMatch in his webroot he'll receive Internal server error.
It causes a permanent redirection with adding two slashes to all URLs except matched files by the Redirect and RedirectMatch directives.

I have not seen the 'Internal Server Error'. Please, hurry up with the fix or any solution.
 
#16
Thank you for the reply. I have another one question. Is there any way to set the separate php.ini file for each user?

For example:
We have the alternative php.ini file in the conf directory of the domain, like this:

[09:07:08][root@sg:/var/www/vhosts/somedomain/conf]# ls -la /var/www/vhosts/somedomain/conf/php.ini
-rw-r--r-- 1 root root 39455 Feb 25 09:00 /var/www/vhosts/somedomain/conf/php.ini

How to force litespeed to use this php.ini file?

Looking forward to your reply.
 
#17
Where are you, guys? I've waited for your reply a least 2 days and got no answer from you.

Could you, please, answer my question?

I realy need a solution.
 
Top