World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
Janko 22-Oct-2009 [6369] | alias "/path/to/target" %script -- I found this .. can I use regex or something else to do AliasMatch ^/some-(.*) /script.rsp?a=$1 |
Dockimbel 22-Oct-2009 [6370x2] | No, only basic mapping is possible currently. |
Btw, alias "/path" %script, should work for whole /path/*. | |
Janko 22-Oct-2009 [6372x6] | hm... then I would just need to parse url in the script instead of using request/content |
much less mess than using another server infront and whole that mess | |
I will try it this way | |
could I do something like alias all except some pattern: for example all except /static/ | |
will the script that get's called see the original url in request/parsed or will that be changed too? (I couldn't make it work yet otherwise) | |
alias "/show/" %www/mobispots.net/show.rsp -- gives me normal 404 of cheyenne (or any nonexistent file) <html><body><h1>404 Page not found</h1></body></html> alias "/show/" %show.rsp -- gives me #[object! [ code: 502 type: access id: cannot-open arg1: %/D/devel/cheyenne0919/www/mobispots.net/www/mobispots.net/ arg2: #[none] arg3: #[none] near: [change-dir first splitted: split-path file] where: #[none] ]] | |
Dockimbel 22-Oct-2009 [6378] | There no exceptions support in Alias. The rewrited url should be available in request/headers/location. |
Janko 22-Oct-2009 [6379x2] | I suspect %show.rsp is the correct one (which gives that error) , because for any nonexistent file likse %show.rspaaa I get 404 so I suspect %www/mobispots.net/show.rsp is also not correct to use |
do you have any idea why this error? %/D/devel/cheyenne0919/www/mobispots.net/www/mobispots.net/ doesn't exist, webapp is in %/D/devel/cheyenne0919/www/mobispots.net/ | |
Dockimbel 22-Oct-2009 [6381] | Erratum: request/headers/location has nothing to do with aliases. |
Janko 22-Oct-2009 [6382x2] | this is my config that makes error when I go on localhost/show/ default [ root-dir %www/mobispots.net/ default [%index.html %index.rsp %index.php] on-status-code [ 404 "/custom404.html" ] alias "/show/" %show.rsp ] |
what do you mean with has nothing to do? | |
Dockimbel 22-Oct-2009 [6384x3] | It's not related to ALIAS but to another config option (REDIRECT). |
Testing locally with latest SVN revision raises an error. Seems broken in the current version. | |
I don't have time now to investiguate much further this issue, I'll have a look tonight. | |
Janko 22-Oct-2009 [6387] | ok, thanks for your time! |
Will 22-Oct-2009 [6388x3] | Janko, I use: on-status-code [ 404 "/index.t" ] that way you intercept all non existent urls and can do what you want |
in mod-static/filter-output I patched this line: req/loops < 4 with req/loops < 1 so after intercepting an urs I can still set a 404 | |
urs -> url | |
Janko 22-Oct-2009 [6391] | hi Will, what is index.t ? could I direct 404 to some.rsp ? |
Will 22-Oct-2009 [6392x2] | yes put the path to an rsp that will act as broker in place of "index.t" |
get the url with this: url: any [select request/parsed/headers 'internal-referer request/parsed/url] | |
Janko 23-Oct-2009 [6394] | Will , thanks a lot, works like a charm :) |
Will 23-Oct-2009 [6395] | good so, means Dock did a great job, but that we know already 8-) |
Janko 23-Oct-2009 [6396] | this solution with 404 also gives me the "exclude" option that I needed so I don't have to have some additonal map but only www.some.com/country/city/place |
Dockimbel 29-Oct-2009 [6397x2] | SVN r35 : FIX: improved RSP script error catching involving unset! values. FIX: fix for a rare case of RSP's response buffer corruption. |
I'll update the CureCode server with this new version in a couple of hours. | |
Pekr 29-Oct-2009 [6399] | Does Cheyenne produce error log? I can see directory called /log, but I can see only default-access file in-there ... |
Dockimbel 29-Oct-2009 [6400] | Error logs: sure. Currently these logs are stored in Cheyenne local folder. |
Graham 29-Oct-2009 [6401] | trace.log |
Pekr 29-Oct-2009 [6402] | why not in log directory = all in one place? |
Dockimbel 29-Oct-2009 [6403] | Because I didn't had time to add code to support that feature which is probably very low priority currently. I'll probably add a config option to better control log storage for the v1. |
Pekr 29-Oct-2009 [6404] | that's not really a problem - just a question on my side - was just wondering, if I have to turn logging-on somewhere, etc. |
Terry 8-Nov-2009 [6405x3] | Hey Doc, how would you deal with an async socket (or .dll) that received events allowing realtime updates on a Cheyenne web page? |
The page itself could poll for info via ajax / comet etc., but how would you interface the socket? | |
ie: user clicks a button on a page, send http to Cheyenne.. Cheyenne pushes a message via the socket, receives a response, and pushes the result back to the page. | |
Dockimbel 9-Nov-2009 [6408] | I would build a new "protocol" module for the underlying UniServe to achieve that. |
Terry 9-Nov-2009 [6409x2] | I've had an idea for Cheyenne.. using it to interface with Freeswitch.. there's a vacuum at the moment, and would be a great opportunity |
http://www.freeswitch.org/ | |
Pekr 9-Nov-2009 [6411x3] | bzzz ... loading :-) |
Is freeswithc something like Asterisk? | |
ah, wrong channel, sorry ... | |
Terry 9-Nov-2009 [6414x4] | I have my old Framewerks (Cheyenne ) connecting via tcp port.. can control all aspects of calls from there.. but my rebol port knowledge is really rusty.. don't even recognize my own code |
Yeah, Freeswitch is better than Asterisk though. | |
There's a good article on installing Freeswitch here http://www.linux-magazine.com/w3/issue/106/Freeswitch.pdf | |
FreePBX (an GUI for Asterisk) is building an interface to freeswitch, but the code is a nightmare | |
Kaj 9-Nov-2009 [6418] | Terry, you can do that with async HTTP in JavaScript (AJAX without the X(ML)) |
older newer | first last |