Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Running a cgi script from index .html

by fruiture (Curate)
on Mar 07, 2003 at 17:21 UTC ( #241191=note: print w/ replies, xml ) Need Help??


in reply to Running a cgi script from index .html

TIMTOWTDI. Do you have SSI available? Enable them for your index.html and use some 'exec cgi' command. Or just make index.html a Perl Program and tell the webserver it is one. Do you have a possibility like mod_rewrite? Just rewrite index.html to whatever script URI you want.

You see, this is more a problem of how to configure your server, not neccesarily a Perl problem. Anyways, I'm sure the Perlmonks can help you if you tell us what webserver you're using.

--
http://fruiture.de


Comment on Re: Running a cgi script from index .html
Re: Re: Running a cgi script from index .html
by mnlight (Scribe) on Mar 07, 2003 at 17:27 UTC
    I am using Apache server.

      That's good. The documentation is available online ;)

      It's likely that Ovid is right and you cannot configure anything at all, but if you can, I think the following will be configurable as it is no danger for the server.

      # .htaccess file <Files index.html> SetHandler cgi-script </File>

      Now you can simply put a Perl Script in "index.html" and it will work.

      If you only want it to be index.html because it is the directory index, there's a better method:

      DirectoryIndex index.cgi index.pl

      You don't need any index.html now, just create index.cgi (or index.pl if you like) and it will be directory index.

      --
      http://fruiture.de

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://241191]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2015-07-02 05:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (29 votes), past polls