如何在Apache 2.4.34中配置fastcgi? fastcgi脚本将作为bin文件下载而不是执行

时间:2019-02-04 12:42:56

标签: apache2.4

**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中启用了它,但仍然无法正常工作。 您能帮我配置一下吗? 预先感谢

0 个答案:

没有答案