当前位置: 技术问答>linux和unix
fedora下apache配置cgi的问题
来源: 互联网 发布时间:2017-05-19
本文导语: 配置http.conf一直不成功,修改了很多地方 但是改来改去一直不成功 如 LoadModule cgid_module modules/mod_cgid.so #AllowOverride none #Require all denied Options +ExecCGI #Options Indexes FollowSymLinks Includes Ex...
配置http.conf一直不成功,修改了很多地方 但是改来改去一直不成功
如 LoadModule cgid_module modules/mod_cgid.so
#AllowOverride none
#Require all denied
Options +ExecCGI
#Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
Options +ExecCGI
AddHandler cgi-script .cgi
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
AllowOverride None
#Options None
Require all granted
#Options ExecCGI MultiViews SymlinksIfOwnerMatch
Options +ExecCGI
Order allow,deny
Allow from all
SetHandler cgi-script
#AddHandler cgi-script .cgi
但是一直不成功
求有经验的指教
http.conf文件(空间有限,删除部分注释):
如 LoadModule cgid_module modules/mod_cgid.so
#AllowOverride none
#Require all denied
Options +ExecCGI
#Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
Options +ExecCGI
AddHandler cgi-script .cgi
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
AllowOverride None
#Options None
Require all granted
#Options ExecCGI MultiViews SymlinksIfOwnerMatch
Options +ExecCGI
Order allow,deny
Allow from all
SetHandler cgi-script
#AddHandler cgi-script .cgi
但是一直不成功
求有经验的指教
http.conf文件(空间有限,删除部分注释):
#
ServerRoot "/usr/local/apache2"
#Listen 12.34.56.78:80
Listen 80
# LoadModule foo_module modules/mod_foo.so
#
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule authn_socache_module modules/mod_authn_socache.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
#LoadModule authz_owner_module modules/mod_authz_owner.so
#LoadModule authz_dbd_module modules/mod_authz_dbd.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_form_module modules/mod_auth_form.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule allowmethods_module modules/mod_allowmethods.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule cache_module modules/mod_cache.so
#LoadModule cache_disk_module modules/mod_cache_disk.so
#LoadModule cache_socache_module modules/mod_cache_socache.so
#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
#LoadModule socache_dbm_module modules/mod_socache_dbm.so
#LoadModule socache_memcache_module modules/mod_socache_memcache.so
#LoadModule macro_module modules/mod_macro.so
#LoadModule dbd_module modules/mod_dbd.so
#LoadModule dumpio_module modules/mod_dumpio.so
#LoadModule buffer_module modules/mod_buffer.so
#LoadModule ratelimit_module modules/mod_ratelimit.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
#LoadModule ext_filter_module modules/mod_ext_filter.so
#LoadModule request_module modules/mod_request.so
#LoadModule include_module modules/mod_include.so
LoadModule filter_module modules/mod_filter.so
#LoadModule substitute_module modules/mod_substitute.so
#LoadModule sed_module modules/mod_sed.so
#LoadModule deflate_module modules/mod_deflate.so
LoadModule mime_module modules/mod_mime.so
LoadModule log_config_module modules/mod_log_config.so
#LoadModule log_debug_module modules/mod_log_debug.so
#LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule unixd_module modules/mod_unixd.so
#LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule info_module modules/mod_info.so
LoadModule cgid_module modules/mod_cgid.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
#LoadModule actions_module modules/mod_actions.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
#LoadModule rewrite_module modules/mod_rewrite.so
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User daemon
Group daemon
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
ServerAdmin you@example.com
#AllowOverride none
#Require all denied
Options +ExecCGI
#Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
DocumentRoot "/usr/local/apache2/htdocs"
#Options Indexes FollowSymLinks
Options +ExecCGI
AddHandler cgi-script .cgi
#AllowOverride None
AllowOverride All
Require all granted
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
DirectoryIndex index.html
Require all denied
ErrorLog "logs/error_log"
LogLevel warn
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %I %O" combinedio
CustomLog "logs/access_log" common
#CustomLog "logs/access_log" combined
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
#Scriptsock cgisock
AllowOverride None
#Options None
Require all granted
#Options ExecCGI MultiViews SymlinksIfOwnerMatch
Options +ExecCGI
Order allow,deny
Allow from all
SetHandler cgi-script
#AddHandler cgi-script .cgi
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
Include conf/extra/proxy-html.conf
# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
# starting without SSL on platforms with no /dev/random equivalent
# but a statically compiled-in mod_ssl.
#
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
#
# uncomment out the below to deal with user agents that deliberately
# violate open standards by misusing DNT (DNT *must* be a specific
# end-user choice)
#
#
#BrowserMatch "MSIE 10.0;" bad_DNT
#
#
#RequestHeader unset DNT env=bad_DNT
#
|
没人来,我就水一下吧,这么高大上,是什么东西