LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > Context with "exp: ..." URI don't seem to work

Reply
 
Thread Tools Display Modes
  #1  
Old 10-23-2005, 07:09 AM
Roman2K Roman2K is offline
Member
 
Join Date: Oct 2005
Posts: 11
Default Context with "exp: ..." URI don't seem to work

Hello,

I have a FastCGI application running on URI / of a virtualhost. I would like web requests of files (which are named like *.*) not to be routed to this FastCGI application so I have set two contexts for this virtual host in the following sequence order :

1) Static :
URI = exp.+\.[^\/]+)$
Location = $DOC_ROOT/$1
Accessible = Yes

2) FastCGI : a working context with URI = /

I reloaded and even restarted LSWS with no success : every time I try to access a file on this virtual host (for example : /css/style.css which exists and is accessible without the context of sequence 2) the request is routed to the FastCGI app.

When I set URI ="/css/" with location = $DOC_ROOT/css/ in the URI of the context #1, I can view my /css/style.css => is "exp:..." in URIs not working ?
What is wrong ? How to achieve my goal ?

Thank you for answers.
Reply With Quote
  #2  
Old 10-23-2005, 03:06 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
That's normal, as LSWS now only process matching context when there is no explicit direct match. So, in your case, the matching context has no effect. Normal contexts have high priority than matching contexts.

With current release, you have to use normal contexts for those files like /css/ you tried.

There is another possible work around by avoiding using FastCGI Context '/' which will match any request, instead, define a Matching FastCGI context with URI "exp:^/$" to match only request to '/' and other FastCGI contexts for each unique URI that should be processed by the FCGI.
But, there is a bug with FastCGI Matching Context in current release that will be fixed. So you have to wait till next release to be able to do that.
Reply With Quote
  #3  
Old 10-25-2005, 10:13 AM
Roman2K Roman2K is offline
Member
 
Join Date: Oct 2005
Posts: 11
Thank you for the answer mistwang.

In the next version, can you make an an option to let normal contexts have the same priority as matching contexts on a per-vhost basis, or something like that, please ?

I will wait for the next version anyway.

Thanks,
Roman.
Reply With Quote
  #4  
Old 10-26-2005, 07:40 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Yes, we will make the matching context higher priority if its sequence number is smaller than any normal context in next release.
Reply With Quote
  #5  
Old 10-30-2005, 03:12 AM
Roman2K Roman2K is offline
Member
 
Join Date: Oct 2005
Posts: 11
Thanks mistwang.
Reply With Quote
  #6  
Old 10-31-2005, 12:06 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
please try 2.1.5 http://www.litespeedtech.com/package...6-linux.tar.gz
Reply With Quote
  #7  
Old 11-01-2005, 02:18 AM
Roman2K Roman2K is offline
Member
 
Join Date: Oct 2005
Posts: 11
Hello mistwang. It works with 2.1.5 ! Thank you again .

There is a small bug now : I tried a context Static exp:^/((images|javascript)\/.+)$
Although it appears correctly in my contexts list, when I try to view or edit it, all the rows of the table or the forum are empty.

However, a FastCGI context with URI / is viewable and editable.

Also, when I try to delete this context, I click "yes" to confirm and I am then redirected to an empty contexts list. When I click the "Context" tab I see the list back.

Here is the generated context part of the vhost conf :
Code:
<contextList>
    <context>
      <type>NULL</type>
      <uri>exp&#58;^/&#40;&#40;images|javascript&#41;\/.+&#41;$</uri>
      <location>$DOC_ROOT/$1</location>
      <allowBrowse>1</allowBrowse>
      <accessControl>
      </accessControl>
      <addDefaultCharset>off</addDefaultCharset>
      <rewrite>
      </rewrite>
    </context>
    <context>
      <type>fcgi</type>
      <uri>/</uri>
      <handler>Test fcgi</handler>
      <accessControl>
      </accessControl>
      <addDefaultCharset>off</addDefaultCharset>
    </context>
</contextList>
Reply With Quote
  #8  
Old 11-01-2005, 09:10 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Thank you for the update.
The new bug should be fixed in the final 2.1.5 package.
For that kind of context, it is better to use two plain context instead of one matching context, should be more efficient. :-)
Reply With Quote
Reply

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
URI only works under "/" in rails context dlhhyct Ruby/Rails 3 10-22-2006 11:34 AM
authorization realm in rails context jdan Install/Configuration 2 10-19-2006 07:11 PM
Context -> MIME Type setting does not work as described in documentation andreas Install/Configuration 3 08-15-2006 08:35 AM
context for CGI script always says "access denied" henpa Install/Configuration 1 03-28-2006 09:43 AM
1.5RC1 context xing Bug Reports 2 04-28-2004 09:27 AM


All times are GMT -7. The time now is 02:40 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.