I downloaded the forum on perl - yabb2 , trying to Freebsd it to Freebsd .
Worth FreeBSD , Apache , and the site, also with pearl-barley scripts. I just put the folder with the pearl-barley scripts yabba in a subfolder of this site - and it is now visible in the browser. But when you try to launch a script from a browser - on launch: 192.168.1.10/cgi-bin/yabb2/Setup.pl it does not run the Setup.pl script, but simply displays its code. How to make it run?
The first line in the script is: #!/usr/bin/perl -w that works with other scripts and the rights to the file are also given: -rwxr-xr-x Setup.pl

  • in fact, the problem is not in Free, but in Apache - I don’t know how to specify the executable perl scripts of the necessary folder in the httpd.conf settings - Joy_25

1 answer 1

Well, for example, you can write such a config for a virtual host

 <VirtualHost *:80> DocumentRoot "/путь_к_пректу/www" ServerName путь_к_пректу.my ErrorLog "путь_к_пректу/logs/apache.log" CustomLog "/путь_к_пректу/logs/apache.log" common Alias /cgi-bin/ "/путь_к_пректу/cgi-bin/" <Directory "/путь_к_пректу/cgi-bin/"> SetHandler cgi-script Options +ExecCGI Order allow,deny Allow from all </Directory> </VirtualHost> 

It is important to set the Apache SetHandler cgi-script and Options + ExecCGI to the scripts folder, and do not forget to give the execution rights to the scripts