Please login or register.

Login with username, password and session length

 

News:

Welcome to the Updated Lua Forum!


Author Topic: wsapi and apache mod_rewrite problem  (Read 57 times)

startx

  • Regular
  • *
  • Posts: 23
    • View Profile
wsapi and apache mod_rewrite problem
« on: July 21, 2010, 03:33:04 am »
hello.

i try to use wsapi.fcgi with apache2 and mod_rewrite and encountered a
weired problem:

my mod rewrite rule is this:
Code: [Select]
RewriteEngine On
 RewriteRule ^/(.*)        /index.lua

i usually use this to redirect everything to a single entry point
in /index.lua, and it works fine if i use this with cgi wrappers like
haserl, and then let the script parse the URL.

however, if i now open an URL like  "mydomain.net/some/webservice" it
does indeed redirect to index.lua , but wsapi tells me:

Code: [Select]

/usr/share/lua/5.1/wsapi/common.lua:267: could not find a filename to
 load, check your configuration or URL stack traceback:
  [C]: in function 'error'
  /usr/share/lua/5.1/wsapi/common.lua:267: in function
 'adjust_non_wrapped' /usr/share/lua/5.1/wsapi/common.lua:275: in
 function 'normalize_paths' /usr/share/lua/5.1/wsapi/common.lua:291: in
 function 'find_module' wsapi.fcgi:15: in function
(tail call): ?

i call it weired because obviously index.lua (there is no other file
in the root dir)  has been opened by the server, the reqrite works

do i need to change the line

Code: [Select]
s, e = path_info:find("[^/%.]+%.[^/%.]+", e + 1)

in wsapi/common.lua somehow to make this work?

 

+ Quick Reply