无法在 Kubuntu 10 上运行 c++ cgi。检查了所有 apache 配置+exec+cgi-bin+api



我正在尝试使用 Apache2 在 kubuntu 10 上编译我的第一个 c++ cgi Programm,但什么都没有。

我已经把它放到 cgi-bin 文件夹中检查了配置文件,根据命令运行程序,将权限更改为可执行文件,但什么都没有。Rekonq 说"没有服务可以处理此文件"

我已经准备好安装apache2。也重新启动了它。坚果

现在已经一整天了,绝望了。如果你有任何想法,会救我

我的 cgi-bin 在 etc/apache2/中。我的配置文件@ etc/apache2/sites-enabled/000-default对于另一个答案,这些是Kub10-12的赖特

您可以在此屏幕截图中看到所有配置和执行。也复制到这里http://img832.imageshack.us/img832/1659/cgiv.jpg

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/error.log
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>
</VirtualHost>

问题是你试图通过文件系统(使用file://个URL)直接访问你的CGI程序,这意味着Apache没有为你的请求提供服务。

相反,请使用 URL 连接到本地主机上运行的 Apache http://localhost/cgi-bin/cplusplus.cgi

相关内容

最新更新