in reply to Re: Structuring a Web site and security issues
in thread Structuring a Web site and security issues

Well, I just found out from Pair that I can't call a CGIwrapped module from my own script. So, I'm outta luck there.

I'm leaning towards placing my instance scripts in a directory on the web side, but having them call my modules located in a directory in my home. For now, until I look at tirwhan's aforementioned piping scheme, I'm thinking of just keeping my config files in the same directory, because I can at least set it to 701.


—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot
  • Comment on Re^2: Structuring a Web site and security issues

Replies are listed 'Best First'.
Re^3: Structuring a Web site and security issues
by pileofrogs (Priest) on Dec 26, 2005 at 19:31 UTC

    I've also been using cgiwrap for a long time, and I loooove it.

    The idea of a cgiwrapped module doesn't really make sense. You need to launch your script with cgiwrap, then it will load your modules and you'll be happy.

    Instead of making your application and trying to figure out CGIwrap with it, make a few really simple scripts that test the functionality of CGIwrap. Then, once you've figured out CGIwrap, tackle your application.

    Here's what I'd recommend.

    Step 1) Make a really dopey whoami script..

    #! /usr/bin/perl -w -T print $<;

    I don't know if that will actually work. You might have to make it generate HTML tags, headers, etc... The important part is that it's a really simple script that only does one thing, which is print your UID.

    Step 2) Make a similarly dopey script that reads your config file. Maybe even a shell script, like this:

    #! /bin/bash cat /home/me/myfiles/.config

    When you're making the whoami script work, you might struggle with CGIwrap's funny URL convention. Make sure you understand it before you go any further. For example:

    If you have a script at /home/me/myfiles/cgi-bin/woot.pl

    You'd have to call it as http://myserver/cgi-bin/cgiwrap/me/woot.pl

    Your ISP can customise that, and they might even set up helpers to make it easier... Just make sure you understand it.

    Good Luck

    --Pileofrogs

      The idea of a cgiwrapped module doesn't really make sense. You need to launch your script with cgiwrap, then it will load your modules and you'll be happy.

      Bing Bing Bing! Light goes on. Thanks!


      —Brad
      "The important work of moving the world forward does not wait to be done by perfect men." George Eliot