Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

building a dynamic site with cgi

by husoft (Monk)
on Oct 01, 2002 at 19:26 UTC ( [id://202083]=perlquestion: print w/replies, xml ) Need Help??

husoft has asked for the wisdom of the Perl Monks concerning the following question:

I'm starting to build a dynamic content website with an administration
side, etc. My question is, is there any way to import cgi scripts
from html files (not shtml) or simply making a cgi-bin alias of other
directory in the web tree?

Replies are listed 'Best First'.
Re: building a dynamic site with cgi
by fsn (Friar) on Oct 01, 2002 at 21:21 UTC
    Hmm... Fellow monk, I feel like a modem with a faulty parity bit setting, recognizing your words but failing to grasp what you are after.

    Do you wan't to upload cgi scripts to the webserver and be able to move it around, using only the webbrowser? That sounds doable to me. Upload scripts are quite common, and I'm sure merlyn has several articles on how to create one. Combined with some sort of webbased filemanager you might have what you are after. Take care of security though. Such a system would give full access to the webserver, allowing the administrator to upload arbitrary code, which could be used to open up holes in your webserver.

    Should I be totally off the target here, please describe your problem a little more in depth, giving examples and possibly code that you've already written, and we will surely be able to help you further.

Re: building a dynamic site with cgi
by Anonymous Monk on Oct 01, 2002 at 22:11 UTC

    I'm not quite sure what you're after but my own web site http://www.greentechnologist.org is an example of a "dynamic" cgi (actually mod_perl) web site. It's dirt simple. A single CGI sits at /wiki/wiki and I redirect the directory index for / to /wiki/wiki. Here's an (edited pathnames and mod_perl -> cgi) snippet from my apache conf. You might need to put this into a .htaccess file in an appropriate directory or something like it. Easy eh? The 404 page is actually just another wiki page so again - nothing unusual.

    Redirect /index.html http://www.greentechnologist.org/wiki/wiki ScriptAlias /wiki/ /var/www/usemod/bin/ ErrorDocument 404 http://www.greentechnologist.org/wiki/wiki?Error_404
Re: building a dynamic site with cgi
by BUU (Prior) on Oct 01, 2002 at 21:26 UTC
    If you have .htaccess or some other means of server control, you can set apache to run cgi scripts from ANY dir, including the root..
Re: building a dynamic site with cgi
by kryberg (Pilgrim) on Oct 02, 2002 at 16:21 UTC
    There certainly are ways to make cgi-bin an alias for directories (do you really want to do that?) but that doesn't seem like the same thing as "import cgi scripts from html files". What do you mean specifically by "import cgi scripts from html files"?
Re: building a dynamic site with cgi
by fglock (Vicar) on Oct 02, 2002 at 16:40 UTC

    way to import cgi scripts from html files (not shtml)

    Maybe what you want is an apache  handler - a program that will be executed using the target file as data.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://202083]
Approved by krisahoch
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-16 21:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found