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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
"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 |
|
|||
|
"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 |
|
|||
|
> 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. |
|
|||
|
>>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) |
|
|||
|
"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 |
|
|||
|
"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 |
|
|||
|
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 | |
|
|