Apache directives with ispconfig

Discussion in 'Server Operation' started by cnocera, Apr 1, 2007.

  1. cnocera

    cnocera New Member

    ispconfig sets the directive "ScriptAlias /cgi-bin/ /var/www/web2/cgi-bin/" With this directive, Apache will not server any pages (html or scripts) from the cgi-bin directory.

    If I manually change ScriptAlias to Alias, everything seems to work. What can I do to fix this?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    You can modify the function make_vhost() in /root/ispconfig/scripts/lib/config.lib.php.
     
  3. cnocera

    cnocera New Member

    Falko, thanks for the reply, but what do I need to modify in the function.
     
  4. falko

    falko Super Moderator Howtoforge Staff

    The line(s) where the ScriptAlias is generated.
     
  5. cnocera

    cnocera New Member

    I am still not understanding what to change. The lines regarding scriptsalias seem to be correct.

    $cgi = "";
    if($web["web_cgi"] == 1) $cgi = "ScriptAlias /cgi-bin/ ".$mod->system->server_conf["server_path_httpd_root"]."/"."web".$web["doc_id"]."/"."cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl";
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Chane:

    if($web["web_cgi"] == 1) $cgi = "ScriptAlias /cgi-bin/ ".$mod->system->server_conf["server_path_httpd_root"]."/"."web".$web["doc_id"]."/"."cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl";

    to:
    if($web["web_cgi"] == 1) $cgi = "Alias /cgi-bin/ ".$mod->system->server_conf["server_path_httpd_root"]."/"."web".$web["doc_id"]."/"."cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl";
     
  7. cnocera

    cnocera New Member

    Falko, Till,

    Thank you very much.

    Carl
     

Share This Page