Trying to make CGI work from anywhere

This is a discussion on Trying to make CGI work from anywhere within the Apache Web Server forums, part of the Web Server and Related Forums category; Want to get my home Apache server working like SDF's so that I can test web pages changes at ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-14-2003
Wesley Groleau
 
Posts: n/a
Default Trying to make CGI work from anywhere

Want to get my home Apache server working like SDF's
so that I can test web pages changes at home before uploading.
SSI that works at SDF (and at my former Rootsweb site) does
not work at home. I haven't tried CGI on SDF and Rootsweb
didn't allow it, but at home,
action="program.cgi"
causes Apache to display the actual script when the form
is submitted.

The lines I changed trying to make this work are:

LoadModule includes_module libexec/httpd/mod_include.so
LoadModule cgi_module libexec/httpd/mod_cgi.so
AddModule mod_include.c
AddModule mod_cgi.c
AddHandler cgi-script .cgi
AddType text/html .shtml
AddHandler server-parsed .shtml

  #2 (permalink)  
Old 08-14-2003
rach
 
Posts: n/a
Default Re: Trying to make CGI work from anywhere

"Wesley Groleau" <wesgroleau@myrealbox.com> wrote in message
news:NY6dnesIsfdNaaeiU-KYgw@gbronline.com...
> Want to get my home Apache server working like SDF's
> so that I can test web pages changes at home before uploading.
> SSI that works at SDF (and at my former Rootsweb site) does
> not work at home. I haven't tried CGI on SDF and Rootsweb
> didn't allow it, but at home,
> action="program.cgi"
> causes Apache to display the actual script when the form
> is submitted.
>
> The lines I changed trying to make this work are:
>
> LoadModule includes_module libexec/httpd/mod_include.so
> LoadModule cgi_module libexec/httpd/mod_cgi.so
> AddModule mod_include.c
> AddModule mod_cgi.c
> AddHandler cgi-script .cgi
> AddType text/html .shtml
> AddHandler server-parsed .shtml


Have you added this to your directory statement?

Options Indexes +ExecCGI

Rach


  #3 (permalink)  
Old 08-14-2003
rach
 
Posts: n/a
Default Re: Trying to make CGI work from anywhere


"Wes Groleau" <groleau@freeshell.org> wrote in message
news:VdednWMnXKQnOqaiU-KYgw@gbronline.com...
> rach wrote:
> > Have you added this to your directory statement?
> >
> > Options Indexes +ExecCGI

>
> No, I haven't. Not sure what it means.
> I know I don't want indexes on--I prefer
> to explicitly offer selected files.
>
> The second one is required for any directory
> that contains a script?
>
> I'll try it. Security risks?
> (None here, since port 80 is blocked
> to the outside, but I'd still like to know)


Yes, that was a typo, I meant to remove indexes from that line but neglected
to. And I forgot to mention the add handler. So do it like:

Options +ExecCGI
AddHandler cgi-script cgi pl

This will then allow cgi to be executed in any folder as long as the files
are chmod a+x.

Rach


  #4 (permalink)  
Old 08-15-2003
Wes Groleau
 
Posts: n/a
Default Re: Trying to make CGI work from anywhere


> Yes, that was a typo, I meant to remove indexes from that line but neglected
> to. And I forgot to mention the add handler. So do it like:
>
> Options +ExecCGI
> AddHandler cgi-script cgi pl
>
> This will then allow cgi to be executed in any folder as long as the files
> are chmod a+x.


I've got the "AddHandler" (and all the other ones
mentioned by the documentation) but the doc didn't
mention ExecCGI.

I put it in, but must restart before testing.

  #5 (permalink)  
Old 08-15-2003
Wes Groleau
 
Posts: n/a
Default Re: Trying to make CGI work from anywhere


>>I've got the "AddHandler" (and all the other ones
>>mentioned by the documentation) but the doc didn't
>>mention ExecCGI.
>>
>>I put it in, but must restart before testing.

>
> This was something I only learned the other day configuring my FreeBSD box
> to do the same. I got it from here:
> http://httpd.apache.org/docs-2.0/how...ml#configuring and look under
> the heading of "Explicitly using Options to permit CGI execution" in that


Blast. Still doesn't work! Off to read the new doc (thanks for the link)

  #6 (permalink)  
Old 08-16-2003
rach
 
Posts: n/a
Default Re: Trying to make CGI work from anywhere


"Wes Groleau" <groleau@freeshell.org> wrote in message
news:TK6cnRUr7OEVKKCiXTWJhw@gbronline.com...
> Wes Groleau wrote:
> > Blast. Still doesn't work! Off to read the new doc (thanks for the

link)
>
> The reason it didn't work after following your advice
> is because I was bypassing Apache with the "go to file"
> option, i.e., file:///Volumes/etc
>
> Once I made that directory an alias, the CGI worked.
>
> The SSI still doesn't work....
>


SSI is my next project to learn.

Rach


  #7 (permalink)  
Old 08-16-2003
rach
 
Posts: n/a
Default Re: Trying to make CGI work from anywhere


"Wes Groleau" <groleau@freeshell.org> wrote in message
news:TK6cnRUr7OEVKKCiXTWJhw@gbronline.com...
> Wes Groleau wrote:
> > Blast. Still doesn't work! Off to read the new doc (thanks for the

link)
>
> The reason it didn't work after following your advice
> is because I was bypassing Apache with the "go to file"
> option, i.e., file:///Volumes/etc
>
> Once I made that directory an alias, the CGI worked.
>
> The SSI still doesn't work....
>


I got SSI now working. I added index.shtml to the DirectoryIndex line and
the uncommented out these lines:

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

Then added +Includes to the Options in my directory statement. It's pretty
kewl.

http://httpd.apache.org/docs-2.0/how...ml#configuring

Next thing I gotta learn is mod_rewrite.

Rach


  #8 (permalink)  
Old 08-16-2003
Wes Groleau
 
Posts: n/a
Default Re: Trying to make CGI work from anywhere

rach wrote:
> I got SSI now working. I added index.shtml to the DirectoryIndex line and
> the uncommented out these lines:
>
> [snip].
>
> http://httpd.apache.org/docs-2.0/how...ml#configuring
>
> Next thing I gotta learn is mod_rewrite.


Sounds like you're just one step ahead of me.
I should just follow you around and I'll
never have to RTFM again.

:-)

 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:22 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0