Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Using CGI for your front page.

by samgold (Scribe)
on Apr 16, 2002 at 02:24 UTC ( #159392=perlquestion: print w/replies, xml ) Need Help??

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

I am not sure if this is the correct place to ask this question but everyone here is so smart I think someone will be able to help me.

I am running apache and mod_perl on windows 2000. I want to use CGI as my front page, index.html, but I am not sure how to do that? Right now I am doing this:
<html> <head> <title>HTML Test Page</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1 +"> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=/cgi-bin/index.cgi"> </head> </html>
I got the second meta line from someone elses code here. It runs the cgi script and it works fine but I want to be able to skip this step. I am new to html, apache and cgi so any help would be greatly appricated and any pointers on where to look would be great also.


Replies are listed 'Best First'.
Re: Using CGI for your front page.
by stephen (Priest) on Apr 16, 2002 at 02:54 UTC
      The default DirectoryIndex should already contain an entry for index.cgi. As long as there is not a file in your home directory that appears earlier than index.cgi in DirectoryIndex, and as long as you have   Options +ExecCGI in your .htaccess (or in httpd.conf), you should have a working .CGI as your default home page. I do this both under Apache and IIS (where the configuration steps differ a bit), and it works fine.

Re: Using CGI for your front page.
by JayBonci (Curate) on Apr 16, 2002 at 03:04 UTC
    You can also include any script to run inside of something with mod_include (it may come with apache by default).
    <!--#include virtual="/cgi-bin/pathto/myscript.cgi" -->

Re: Using CGI for your front page.
by samgold (Scribe) on Apr 16, 2002 at 13:51 UTC
    Thank you so much for the help.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2022-08-17 17:04 GMT
Find Nodes?
    Voting Booth?

    No recent polls found