Virtual Hosts using POST with CGI scripts

Virtual Hosts using POST with CGI scripts

Post by Mike Jippi » Wed, 07 May 1997 04:00:00



I'm using Apache 1.2b10.  I cannot seem to configure this server to
accept CGI scripts that using POST as the request method.  I have STUFFED
the <VirualHost xxx> directive with everything I can.  I can get files
with the ".cgi" suffix to run, but I WANT all files in a certain
directory to run with or without the ".cgi" suffix.

Here's my VirtualHost directive (with the names changed to protect the
innocent):

<VirtualHost www.somedomain.com>
   ServerName www.somedomain.com
   ErrorLog logs/error_log.www.somedomain.com
   TransferLog logs/access_log.www.somedomain.com
   RefererLog logs/referer_log.www.somedomain.com
   DocumentRoot /domains/somedomain/www
      Alias /cgi-bin /domains/somedomain/www/cgi-bin
      Alias /cgi-src /domains/somedomain/www/cgi-src
      ScriptAlias /cgi-bin/ /domains/somedomain/www/cgi-bin/
      AddType text/x-imagemap .map
      AddType text/x-server-parsed-html .shtml
      AddType application/x-httpd-cgi .cgi
      AddHandler server-parsed .shtml
      AddHandler cgi-script .cgi

   <Directory /domains/somedomain/www/cgi-bin>
        Options All
        <Limit GET POST>
        order allow,deny
        allow from all
        </Limit>
   </Directory>
</VirtualHost>

SIGH!  Does anyone have a clue how to "turn on" the script in
/domains/somedomain/www/cgi-bin?

THanks.

  -- Mike

  ----------------------------------------------------

    System Administrator    | (616) 395-1201
    Macatawa Area           | (616) 395-7123 fax
         Community Network  |

 
 
 

Virtual Hosts using POST with CGI scripts

Post by Kurt J. Lanz » Wed, 07 May 1997 04:00:00



> I'm using Apache 1.2b10.  I cannot seem to configure this server to
> accept CGI scripts that using POST as the request method.  I have STUFFED
> the <VirualHost xxx> directive with everything I can.  I can get files
> with the ".cgi" suffix to run, but I WANT all files in a certain
> directory to run with or without the ".cgi" suffix.

> Here's my VirtualHost directive (with the names changed to protect the
> innocent):

> <VirtualHost www.somedomain.com>
>    ServerName www.somedomain.com
>    ErrorLog logs/error_log.www.somedomain.com
>    TransferLog logs/access_log.www.somedomain.com
>    RefererLog logs/referer_log.www.somedomain.com
>    DocumentRoot /domains/somedomain/www
>       Alias /cgi-bin /domains/somedomain/www/cgi-bin
>       Alias /cgi-src /domains/somedomain/www/cgi-src
>       ScriptAlias /cgi-bin/ /domains/somedomain/www/cgi-bin/
>       AddType text/x-imagemap .map
>       AddType text/x-server-parsed-html .shtml
>       AddType application/x-httpd-cgi .cgi
>       AddHandler server-parsed .shtml
>       AddHandler cgi-script .cgi

>    <Directory /domains/somedomain/www/cgi-bin>
>         Options All
>         <Limit GET POST>
>         order allow,deny
>         allow from all
>         </Limit>
>    </Directory>
> </VirtualHost>

> SIGH!  Does anyone have a clue how to "turn on" the script in
> /domains/somedomain/www/cgi-bin?

> THanks.

The NCSA server (and perhaps the one you are running) insists that the
script start with a "#!" line identifying the interpreter before
running it. Maybe you need those with your server?
--
Kurt J. Lanza


 
 
 

Virtual Hosts using POST with CGI scripts

Post by Marc Slemk » Thu, 08 May 1997 04:00:00



Quote:>Here's my VirtualHost directive (with the names changed to protect the
>innocent):
><VirtualHost www.somedomain.com>
>   ServerName www.somedomain.com
>   ErrorLog logs/error_log.www.somedomain.com
>   TransferLog logs/access_log.www.somedomain.com
>   RefererLog logs/referer_log.www.somedomain.com
>   DocumentRoot /domains/somedomain/www
>      Alias /cgi-bin /domains/somedomain/www/cgi-bin
>      Alias /cgi-src /domains/somedomain/www/cgi-src
>      ScriptAlias /cgi-bin/ /domains/somedomain/www/cgi-bin/

Remove the Alias directive and just have the ScriptAlias one.
 
 
 

Virtual Hosts using POST with CGI scripts

Post by Michael Fu » Tue, 13 May 1997 04:00:00


    [ cc to author ]


> I'm using Apache 1.2b10.  I cannot seem to configure this server to
> accept CGI scripts that using POST as the request method.  I have STUFFED
> the <VirualHost xxx> directive with everything I can.  I can get files
> with the ".cgi" suffix to run, but I WANT all files in a certain
> directory to run with or without the ".cgi" suffix.

> Here's my VirtualHost directive (with the names changed to protect the
> innocent):

> <VirtualHost www.somedomain.com>
>    ServerName www.somedomain.com
>    ErrorLog logs/error_log.www.somedomain.com
>    TransferLog logs/access_log.www.somedomain.com
>    RefererLog logs/referer_log.www.somedomain.com
>    DocumentRoot /domains/somedomain/www
>       Alias /cgi-bin /domains/somedomain/www/cgi-bin
>       Alias /cgi-src /domains/somedomain/www/cgi-src
>       ScriptAlias /cgi-bin/ /domains/somedomain/www/cgi-bin/

I haven't check everything else out, but have you tried getting
rid of that "Alias /cgi-bin"?  That could be interfering with
your ScriptAlias line.

--
Michael Fuhr
http://www.dimensional.com/~mfuhr/

 
 
 

1. Server misconfig when using POST-method in CGI-scripts

How can I get my CGI scripts to work with the POST-method?

I only seem to make them work with GET; when I try to use POST, my browser
replies with "Server misconfiguration error...".

This happens both on the Linux platform (Apache 1.3.6) and on the Windows
platform.

Could somebody help me solve this?

Regards,

Magne
--
Magne Blues Boy Storl?kken


Phone: +47 67919890 / 67929775
Mobile: +47 92480539

2. public domain gks (graphics) for unix?

3. Apache 1.3b2: Default Host and all virtual hosts serve only first virtual hosts pages?

4. Broken Permissions?

5. Trouble w/CGI Scripts & Virtual Server Using Apache

6. What CA for Apache_SSL

7. Using .cgi/.pl to enable CGI script in Apache

8. Kernel Compile problem

9. FrontPage virtual hosting, removal or reset of virtual host

10. : How to prevent one named virtual host from "seeing" another virtual hosts files ?

11. Mixing Apache Name Based Virtual Hosts and SSL Virtual Host

12. For Discussion: web virtual hosting vs mail virtual hosting

13. CGI POST Method and Referring Host?