apache 安装后的 Bugzilla 错误:“TEST-FAILED Web Server 未执行 CGI 文件”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/465222/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 17:10:34  来源:igfitidea点击:

Bugzilla error after installation: "TEST-FAILED Web Server is not executing CGI files"

linuxapachebugzilla

提问by

I want to install Bugzilla on my linux server. The installation was successful, but it gives this error:

我想在我的 linux 服务器上安装 Bugzilla。安装成功,但是出现这个错误:

TEST-FAILED Web Server is not executing CGI files

How to resolve this?

如何解决这个问题?

回答by splattne

From the Bugzilla configuration guide:

Bugzilla 配置指南

2.2.4.1. Apache httpd

2.2.4.1. Apache httpd

To configure your Apache web server to work with Bugzilla, do the following:

要将 Apache Web 服务器配置为与 Bugzilla 一起使用,请执行以下操作:

  1. Load httpd.conf in your editor. In Fedora and Red Hat Linux, this file is found in /etc/httpd/conf.
  2. Apache uses directives to permit fine-grained permission setting. Add the following lines to a directive that applies to the location of your Bugzilla installation. (If such a section does not exist, you'll want to add one.) In this example, Bugzilla has been installed at /var/www/html/bugzilla.
  1. 在编辑器中加载 httpd.conf。在 Fedora 和 Red Hat Linux 中,该文件位于 /etc/httpd/conf。
  2. Apache 使用指令来允许细粒度的权限设置。将以下行添加到适用于您的 Bugzilla 安装位置的指令。(如果这样的部分不存在,您需要添加一个。)在本例中,Bugzilla 已安装在 /var/www/html/bugzilla。

Check this:

检查这个:

<Directory /var/www/html/bugzilla>
   AddHandler cgi-script .cgi
   Options +Indexes +ExecCGI
   DirectoryIndex index.cgi
   AllowOverride Limit
</Directory>

These instructions allow Apache to run .cgi files found within the bugzilla directory; instructs the server to look for a file called index.cgi if someone only types the directory name into the browser; and allows Bugzilla's .htaccess files to override global permissions.

这些指令允许 Apache 运行在 bugzilla 目录中找到的 .cgi 文件;如果有人只在浏览器中键入目录名称,则指示服务器查找名为 index.cgi 的文件;并允许 Bugzilla 的 .htaccess 文件覆盖全局权限。

回答by Viv

Changing SELinux settings to permissive worked for me.

将 SELinux 设置更改为 permissive 对我有用。

In Fedora Core and RedHat Enterprise, edit /etc/selinux/config and you will see some lines like this:

在 Fedora Core 和 RedHat Enterprise 中,编辑 /etc/selinux/config,您将看到如下几行:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

... just change SELINUX=enforcingto SELINUX=permissiveand you're done.

...只需更改SELINUX=enforcing为即可SELINUX=permissive完成。

回答by Bombe

You might try to read the Apache documentation, it should contain everything you need.

您可以尝试阅读Apache 文档,它应该包含您需要的一切。