Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running CGIs on Apache

Status
Not open for further replies.

abrim

Programmer
Joined
Jul 30, 2004
Messages
1
Location
US
I want to use Apache to run blosxom(to generate static pages of data/audit logs) on windows. I know suexec would do it for me on unix. How would I do it using windows?
 
First, you need perl installed. If you don't have it, you can get it here:
You can also run perl as a module. I'm not sure where to get it but I'm pretty sure a google search for "mod_perl" will turn up something. Next you need to have a cgi-bin which is a special directory for scripts. You should already have one but if not it's not hard to do. First, use the ScriptAlias directive to tell apache where this directory is. ScriptAlias does two things. It tells apache to treat the cgi-bin as thou it were in the DocumentRoot and to treat everything in cgi-bin and its sub-directories as a script. Then create the Directory container for it. It will look like this:

Code:
ScriptAlias /cgi-bin/    "/real/path/to/cgi-bin/"

<Directory "/real/path/to/cgi-bin">

 Note:  Don't use the trailing slash for the container.
 Put all your directories options and directives here.

</Directory>

As a rule, if your cgi scripts are more than one file, you would create a sub-directory inside cgi-bin.  You do NOT have to redefine them because all directives defined in cgi-bin, apply to all its sub-directories.  If you don't want to create a cgi-bin for some reason, you can use the "+ExecCGI" directive in the directory container where you want to use the script.  You will also want to make sure there is an "AddHandler script-cgi .pl .cgi" directive and it is uncommented".  This is usually define in the global section.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top