You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jay Turberville <ja...@studio522.com> on 2002/04/15 08:56:31 UTC

Unable to execute a simple Win32 CGI script on Apache 2.0.35

I'm pretty new to running a web server. My first and current dabbling
has been to use Lil' HTTP which is a very simple and easy
to use web server for Win32 OSes. I have a site for family, friends
etc. at http://www.jayandwanda.com. Lil' HTTP has limited CGI and
SSI capability and I have a simple timestamp and counter on the main
site page. These CGI scripts are Win32 executables and are called in
this manner: <!-- #exec cgi="datetime.cgi?time12" -->.

As I understand it, the webserver executes the Win32
executable "datetime.cgi" and that executable outputs the current
system time to the webserver. The webserver then updates the
calling page with the output from "datetime.cgi". Very simple and neat.

For a number of reasons I would like to move the site over to
Apache. So I've got an initial install of Apache 2.0.35 running on a
different machine serving pages duplicated from my active site. (I'm
just using an internal network IP address for now.) However, I
can't get these simple Win32 CGI "scripts" (actually Win32 executables) to
run.
I've gone through the online documentation and as far as I can tell I
have properly included the "Includes" and "ExecCGI" options. As a test,
I have tried to do an <!-- #exec cmd= "dir" -->... command from one of my
pages
as well and I get the same "no response."  The displayed page simples shows
some whitespace where the response should be and I see the original CGI
command or white space on the page when I do a "view source".

When I put a:

<!--#config timefmt="%A %B %d, %Y" -->
Today is <!--#echo var="DATE_LOCAL" -->

in the page as shown in the Apache 2.0 docs pages, I get a proper response
displayed
on my page. I conclude then that my Option Include is not the problem?  I'm
guessing
the problem must be elsewhere.

I'm probably missing something simple and obvious. I admit I am
unfamiliar (being a newbie and all) with editing the httpd.conf
file, but it really doesn't seem like rocket science. I have placed
my current hpptd.conf file on my anonymous ftp server at:
ftp://jayandwanda.com in case that would be of any help to anyone
wishing to help.

I understand that most Apache users are implementing CGI
with Perl.  Perhaps I should just skip the Win32 CGI script
and jump right to Perl?  I would do that, but I hate to go
forward with a fundamental misunderstanding about what is going on.
Besides, the "exec cmd" is basic and should work.  Right? Or perhaps
I would be wiser starting out with Apache 1.3?

Any help is appreciated. Thanks.

Jay




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Problem with Rewrite Rules

Posted by rd...@starband.net.
  I am having a problem with Rewrite Rule.
  I what the user to be able to type in there domain name and then
  admin and be redirected to a control panel on the same server but
  running on a different port.
  Like so
  http://userdomainname/siteadmin

  What I have below works but it changes the http://userdomainname to www.domain.com
  I what it to stay the same as what they type in and not change to
  the main site on the server. should I use a variable in the lines
  below to do this and if yes how

RewriteEngine On
RewriteCond %{HTTP_HOST}                ^([^:]+)
RewriteRule ^/admin/?$       http://www.domain.com:81/admincontrol/index.php
RewriteRule ^/siteadmin/?$   http://www.domain.com:81/usercontrol/index.php



In the VirtualHost settings
I have this
<VirtualHost 000.00.000.000>
DocumentRoot /usr/sites/www.domain.com/web
ServerName domain.com
RewriteEngine on
RewriteCond %{HTTP_HOST}                !^000.00.000.000(:80)?$
RewriteCond %{HTTP_HOST}                !^www.domain.com(:80)?$
RewriteRule ^/(.*)                      http://www.domain.com/$1
RewriteOptions inherit
</VirtualHost>




Best regards,
Richard                           mailto:rdkurth@starband.net


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org