Serving Perl?

Discussion in 'Installation/Configuration' started by fooboo, Mar 2, 2010.

  1. fooboo

    fooboo New Member

    I have a working install of ISPConfig3. It serves html and php without a problem but I'm trying to install a perl based site (Bugzilla).
    Bugzilla installs all of it's cgi files to the root of the target website (not cgi-bin).
    As far as I can tell bugzilla is setup correctly as it comes with a script that does most of it for you.

    I know the files are in the folder as if I type in <mydomain>.com/index.cgi I get a page of perl as text (rather than it being processes) so the site can find and serve the files it just not processing them.

    If I tick CGI on my site setup ISPConfig adds default settings to point to /cgi-bin/ but I need to set this up so that perl is interpreted at run time from the /web root directory.

    Has anyone any experience of this?

    I've tried modding the vhost file (I know you're not supposed to :p) to see if I could work out the correct settings but to no avail.
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Can you post your current vhost configuration?
     
  3. fooboo

    fooboo New Member

    Sorry I didn't realise I had a reply, I didn't get an email notification even though I've subscribed.

    <Directory /var/www/<domain>>
    AllowOverride None
    Order Deny,Allow
    Deny from all
    </Directory>

    <VirtualHost <local ip>:80>
    DocumentRoot /var/www/<domain>/web

    ServerName <domain>
    ServerAdmin webmaster@<domain>

    ErrorLog /var/log/ispconfig/httpd/<domain>/error.log

    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 503 /error/503.html

    <Directory /var/www/<domain>/web>
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    <Files ~ '.php[s3-6]{0,1}$'>
    Order allow,deny
    Deny from all
    Allow from none
    </Files>
    </Directory>
    <Directory /var/www/clients/client1/web25/web>
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    <Files ~ '.php[s3-6]{0,1}$'>
    Order allow,deny
    Deny from all
    Allow from none
    </Files>
    </Directory>

    # cgi enabled
    <Directory /var/www/clients/client1/web25/cgi-bin>
    Order allow,deny
    Allow from all
    </Directory>
    ScriptAlias /cgi-bin/ /var/www/clients/client1/web25/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl


    </VirtualHost>
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Can you add the following line right behind
    Code:
    ScriptAlias /cgi-bin/ /var/www/clients/client1/web25/cgi-bin/
    :
    Code:
    ScriptAlias / /var/www/clients/client1/web25/web/
    Restart Apache afterwards. Does it work then?
     
  5. fooboo

    fooboo New Member

    I tried that and it didn't make a difference.
    I tried modifying the directory too to remove cgi-bin and still no luck.
     
  6. fooboo

    fooboo New Member

    If I type in the index file name 'index.cgi' (since it wont automatically serve that file) I get a 403 error, which looks like a permission problem but I don't know who or what permissions I'd need to set. Can anyone advise me?
     
  7. falko

    falko Super Moderator ISPConfig Developer

    What's in Apache's error log when this happens?
     
  8. fooboo

    fooboo New Member

    attempt to invoke directory as script: /var/www/clients/client1/web25/web
    client denied by server configuration: /var/www/clients/client1/web25/weberror

    On reading this I added a '/' to the end of the ScriptAlias to see if that makes a difference but I still get:

    attempt to invoke directory as script: /var/www/clients/client1/web25/web
    script not found or unable to stat: /var/www/clients/client1/web25/web/error/noindex.html


    so I added 'DirectoryIndex index.cgi' to see if that would make it server the cgi as the index file but I get the same error.

    I tried another example for the setup:

    <Directory /var/www/clients/client1/web25/web>
    AllowOverride All
    DirectoryIndex index.cgi
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    Options +ExecCGI
    </Directory>

    but this gives me:

    Directory index forbidden by Options directive: /var/www/<my domain>/web/

    and displays the default Apache webpage you get after a new install.
     
  9. fooboo

    fooboo New Member

    Wahay it works :D

    A friend pointed out that I could add directives to the .htaccess file. After doing so it worked straight away.
    Thanks for your help, I learned stuff along the journey.
     

Share This Page