apache2.4 - 如何在 apache 2.4.34 中配置 fastcgi?fastcgi 脚本作为 bin 文件下载而不是执行
问题描述
**my apache2.conf file looks like::**
当我执行 fastcgi 示例时,脚本被下载为 bin 文件而不是执行。我无法配置 fastcgi。我安装了 libapache2-mod-fcgid 并在 apache2 中启用了它,但它仍然不起作用。
DefaultRuntimeDir ${APACHE_RUN_DIR}
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted`enter code here`
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /usr/lib/cgi-bin>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Require all granted
</Directory>
#<Directory /srv/>
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
-----------------------------------------------------
**my 000-default.conf file looks like::**
<VirtualHost *:80>
ServerName localhost
ServerAdmin webmaster@localhost
DocumentRoot /usr/lib/cgi-bin/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
---------------------------------------------------
**my ports.conf file looks like:::**
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 80
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>`enter code here`
Listen 443
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
当我执行 fastcgi 示例时,脚本被下载为 bin 文件而不是执行。我无法配置 fastcgi。我安装了 libapache2-mod-fcgid 并在 apache2 中启用了它,但它仍然不起作用。你能帮我配置一下吗?提前致谢
解决方案
推荐阅读
- php - 解析错误:语法错误,行中文件意外结束
- jekyll - bundler 无法安装 commonmarker
- c# - 如何从 dll 中释放串行 COM 端口
- ios - viewWillAppear 没有调用 didDeselectRowAt
- visual-studio-2019 - Visual Studio 2019 社区版未检测到 Vcpkg 库
- c++ - 如何转换矢量
到 char* arr[]? - python - 如何发挥更多功能更具体的替换功能
- orientdb - OrientDB 是否活跃和竞争?
- python - 删除带有条件的列表中的字典
- react-native - react native 中的步骤视图或时间轴视图