- 论坛徽章:
- 0
|
迁移服务器后,作为action 的 cgi 文件都不执行了,而是直接在浏览器上打印代码,在服务器上直接运行cgi 文件则一切正常。
文件权限设为755
思来想去,是不是唯有appache 的 配置问题 ,请大家指教:
下面是httpd.conf文件
ServerRoot "/etc/httpd"
# LoadModule foo_module modules/mod_foo.so
#
LoadModule cgid_module modules/mod_cgid.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule cgid_module /etc/httpd/modules/mod_cgid.so
Include conf.modules.d/*.conf
#
# 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 apache
User nobody
# Group apache
Group nobody
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName 10.10.23.23:80
ServerName m1.qa.abc.com:80
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all granted
</Directory>
#
#DocumentRoot "/var/www/html"
DocumentRoot "/home/web/"
# Relax access to content within /var/www.
#
#<Directory "/var/www">
<Directory "/home/web/">
Options Indexes FollowSymLinks ExecCGI Includes
AddHandler cgi-script .cgi .pl
AllowOverride All
Order Deny,Allow
Allow from All
</Directory>
# Further relax access to the default document root:
<Directory "/var/www/html">
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
<Directory />
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
</Directory>
##<VirtualHost *>
##</VirtualHost>
<VirtualHost *:80>
DocumentRoot /home/web
ServerName m1.qa.abc.com
#ErrorLog logs2/dev_error_log
#CustomLog logs2/dev_access_log common
</VirtualHost>
#
#
<IfModule dir_module>
DirectoryIndex index.html index.html.var index.cgi index.shtml
</IfModule>
DirectoryIndex index.html index.html.var index.cgi index.shtml
<Files ".ht*">
Require all denied
</Files>
#
LogLevel warn
<IfModule log_config_module>
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
# 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
</IfModule>
#
CustomLog "logs2/access_log" combined
</IfModule>
<IfModule alias_module>
#ScriptAlias /cgi-bin/ "/usr/local/cgi-bin/"
ScriptAlias /cgi-bin/ "/home/web/Vulnsigs_Release/cgi-bin/"
</IfModule>
ScriptAlias /cgi-bin/ "/home/web/Vulnsigs_Release/cgi-bin/"
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
#<Directory "/var/www/cgi-bin">
<Directory "/home/web/Vulnsigs_Release/cgi-bin">
Options Indexes FollowSymLinks ExecCGI Includes
AddHandler cgi-script .cgi .pl
AllowOverride All
Options All
Order allow,deny
Allow from all
</Directory>
<IfModule mime_module>
#
TypesConfig /etc/mime.types
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi .pl
# For type maps (negotiated resources):
#AddHandler type-map var
#
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
#
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
MIMEMagicFile conf/magic
</IfModule>
<IfModule mod_cgi.so>
Include conf.modules.d/01-cgi.conf
</IfModule>
#
#EnableMMAP off
EnableSendfile on
# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf
ErrorLog logs2/error_log
CustomLog logs2/access_log common
KeepAlive On
KeepAliveTimeout 15
MaxKeepAliveRequests 0
MaxClients 150
UserDir public_html
DefaultType text/html
TypesConfig /etc/mime.types
AddType text/html .shtml .cgi .pl
AddOutputFilter INCLUDES .shtml
#AccessFileName .htaccess
<Files ~ "\.(pl|cgi)$">
SetHandler perl-script
##Options +ExecCGI
Options Indexes FollowSymLinks ExecCGI Includes
</Files>
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
#<FilesMatch "[^.]+\.cgi$">
# SetHandler cgi-script
#</FilesMatch>
|
|