configure apache to run perl scripts from any folder

From WebHostingNeeds.com
Jump to: navigation, search

in Apache configuration file httpd.conf

Add

AddHandler cgi-script .cgi
AddHandler cgi-script .pl

Set folder permission for your DocumentRoot.


<Directory /home/user/public_html/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
</Directory>


Find

Options Indexes FollowSymLinks MultiViews

Replace with

Options All

Example Virtual Host configuration

<VirtualHost 67.228.104.123:80>
DocumentRoot /var/www/cgi-bin/
ServerName git.bizhat.com
CustomLog /var/log/httpd/git.bizhat.com.log combined
AddHandler cgi-script .cgi
<Directory "/var/www/cgi-bin/">
    AllowOverride None
    Options All
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>

This is to allow for one site.




apache