Rebol Talk Forum  |  REBOL Discussions  |  REBOL Core  |  Topic: webserv.r
Pages: [1] Print
Author Topic: webserv.r  (Read 855 times)
jfdutcher
Jr. Member
**
Offline Offline

Posts: 95


View Profile
webserv.r
« on: August 21, 2007, 08:38:38 PM »

I created a folder on Windows (Rebol Web Server) and placed webserv.r into it.
I created (2) folders inside this one.....WWW   and  CGI-BIN.  I put an index.html page in the WWW folder and a Rebol CGI script (helloworld.r) into the CGI_BIN
folder (and, subsequently, I put helloworld.r directly into the "Rebol Web Server" folder itself, up one level from CGI-BIN, so it is in both places).

I start View and "change-dir" to the "Rebol Web Server" where I "do %webserv.r".

If I now set the browser to http://localhost/index.html....the index page is indeed returned as expected.

If I set the browser to http://localhost/helloworld.r  OR to
                                http://localhost/cgi-bin/helloworld.r
a page not found is returned in either case.

This is the log entry:
127.0.0.1 - - [21/Aug/2007:21:24:14 -4:00] "GET /helloworld.r HTTP/1.1" 404 0 - "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"

What's missing   ??
Logged
jfdutcher
Jr. Member
**
Offline Offline

Posts: 95


View Profile
Re: webserv.r
« Reply #1 on: August 21, 2007, 08:43:47 PM »

Forgot to mention....yes, I have created the 'webserv-cfg'  and 'content-types'
files in the "Rebol Web Server" folder as well........I listen on port 80
Logged
jfdutcher
Jr. Member
**
Offline Offline

Posts: 95


View Profile
Re: webserv.r
« Reply #2 on: August 22, 2007, 06:36:11 AM »

Can't try this now as I'm at work, but after re-reading the docs about webserv.r
on the web....perhaps the answer is that the CGI_BIN folder has to be a sub-folder under WWW ...... not  a folder at the same level as WWW.
Logged
jfdutcher
Jr. Member
**
Offline Offline

Posts: 95


View Profile
Re: webserv.r
« Reply #3 on: August 22, 2007, 07:49:10 PM »

That last observation I made proved fruitful...the scripts began to run when the CGI-BIN was placed 'inside' the WWW folder.......but they won't 'repeat' running
and merely respond with a 404 error when pointed at a 2nd time by the browser.

I don't have time to unravel webserv.r and will move on ..... but maybe another user
will relate to the setup as I describe above.
Logged
jfdutcher
Jr. Member
**
Offline Offline

Posts: 95


View Profile
Re: webserv.r
« Reply #4 on: August 24, 2007, 07:12:06 AM »

Just in case it may be helpful to another Apache user I finally get this explanation for problems on my Apache hosted site (Linux) which sent me to trying webserv.r in the first place:


Apache mod_security uses rules to determine if a web request is "dangerous", and how to deal with such requests.
Bad rules will think that posts which contain "cat", "sh" followed by a space, "system", or any of thousands
of other possible word combinations are bad, and simply prevent your script from seeing the request, which causes
Apache to not get headers back from the script (it never runs), and generate an Internal Server Error 500.

GoDaddy level 1 support people have no real knowledge and are probably doing ther only thing they know how
to do....state that the problem is a scripting error, which, of course is not the case.
Logged
DefiantPc
Administrator
Jr. Member
*
Offline Offline

Posts: 70


View Profile
Re: webserv.r
« Reply #5 on: September 03, 2007, 11:18:47 AM »

Thanks for the information, and keep us posted on any updates...

Wanted to let you know that your input is appreciated...

-Mj.
Logged
Pages: [1] Print 
Rebol Talk Forum  |  REBOL Discussions  |  REBOL Core  |  Topic: webserv.r
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 28, 2008, 02:42:07 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2231 Posts in 579 Topics by 1730 Members
Latest Member: OpepriphefS

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc