【问题标题】:CGI script not executing but displaying content after installing mooshak安装 mooshak 后 CGI 脚本未执行但显示内容
【发布时间】:2014-08-14 05:48:29
【问题描述】:

最近,我在 Ubuntu 14.04 中下载并安装了mooshak。我按照要求和安装页面中给出的所有步骤进行操作。

当我尝试访问http://localhost/~mooshak 时,我被重定向到http://localhost/~mooshak/cgi-bin/execute 并显示以下内容:

#!/bin/sh
# the next line restarts using tclsh \
PATH=$PATH:/usr/local/bin:/usr/contrib/bin  ; exec tclsh "$0" "$@"

#-*-Mode: TCL; iso-accents-mode: t;-*-  

cd ../..

lappend auto_path packages

source .config

execute::command_line

谁能指出我正确的方向?这是我的/etc/apache2/mods-enabled/userdir.conf 文件的内容:

<IfModule mod_userdir.c>
    UserDir public_html
    UserDir disabled root

    <Directory /home/*/public_html>
        AllowOverride FileInfo AuthConfig Limit Indexes
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        <Limit GET POST OPTIONS>
            Require all granted
        </Limit>
        <LimitExcept GET POST OPTIONS>
            Require all denied
        </LimitExcept>
    </Directory>

    <Directory /home/*/public_html/cgi-bin>
        Options +ExecCGI -Includes -Indexes
        SetHandler cgi-script
        Order allow,deny
        Allow from all
    </Directory>

</IfModule>

提前致谢!

【问题讨论】:

    标签: cgi-bin


    【解决方案1】:

    确保您在 Apache2 中启用了模块 userdirsuexec。如果需要执行以下命令

    cd /etc/apache2/mods-enabled
    sudo ln -s ../mods-available/userdir.conf
    sudo ln -s ../mods-available/userdir.load
    sudo ln -s ../mods-available/suexec.load
    

    您需要重新启动 Apache 以激活配置。

    sudo apache2ctl graceful
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-05
      • 2022-07-28
      • 2022-01-27
      • 1970-01-01
      相关资源
      最近更新 更多