[Nottingham] CGI Scripts on Server

Johan Boshoff jboshoff at rpc.co.za
Thu Aug 10 21:34:07 BST 2006


Thanks Godfrey!

I finally got it right, I forgot a / at the end of the damn ScriptAlias. 
Can;t believe that such a small thing can mess up everything!

Thanks once again!

Johan






----- Original Message ----- 
From: "Godfrey Nix" <godfrey at gnnix.co.uk>
To: <nottingham at mailman.lug.org.uk>
Sent: Wednesday, August 02, 2006 11:29 PM
Subject: Re: [Nottingham] CGI Scripts on Server


> On Wed, 2006-08-02 at 19:05 +0200, Johan Boshoff wrote:
>> Hi all,
>>
>> How do I enable cgi scripts on fedora4?  Basically my httpd.conf file 
>> points
>> to a location /webserver/cgi-bin, but my websites are stored in
>> /webserver/htdocs/.....  How do I link to that cgi-bin folder when I want 
>> to
>> run a script like formmail.pl on a website that generates a form.  I 
>> tried
>> pointing the cgi-bin folder to the main domain so that I can try to link 
>> to
>> example www.test.com/cgi-bin/formmail.pl, but it does not work.
>>
>
> What you need is "ScriptAlias" in the Apache configuration file for
> (each ) site. For example, to run scripts in /home/userFred/cgi-bin, you
> need to have:
> ScriptAlias /cgi-bin/ /home/userFred/cgi-bin/
>
> Now, all references to website.com/cgi-bin/script.pl will run the
> program in /home/userFred/cgi-bin/
>
> If this is within a VirtualHost block then it will apply only to that
> website. If not inside a VirtualHost block it will apply to ALL sites.
>
>
>> I want to have a cgi-bin directory for each domain on my server so that
>> users can upload and link to their own scripts.
>>
> Be VERY careful. By allowing users to upload scripts, you allow them to
> cause problems - from the simple crash the server (put in an infinite
> loop  eg crash.sh = fork xxxxxxxx ! (Please do not try to run,
> censored), to the downright [well, WRONG ] extract passwords, install
> trojan, etc
>
>
> Regards,
>
> Godfrey
>
> -- 
> Godfrey Nix <godfrey at gnnix.co.uk>
>
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham 




More information about the Nottingham mailing list