求助大神:如何Window 7 64位 Apache2.2 + Mod_wsgi配置后应用cgi不成功!修改http.conf后就保 500 Error,

Study_Fiona 2016-11-29 05:51:51
环境;windows7 64位装了apchache +Mod_wsgi,

httpd-2.2-x64_with_mod_wsgi +python 2.7.12 前面在CSDN上面可以有现成的下,

Error重现:
1.新建一个friends.cgi放到cgi-bin下面
2.输入网址:localhost:8000/cgi-bin/friends.cgi 后直接跳出500 Error,加了下面的两行代码后,apache都启动不了了!!


我的httpd.conf如下:

#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/httpd-2.2-x64" will be interpreted by the
# server as "/httpd-2.2-x64/logs/foo.log".
#
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
# If a drive letter is omitted, the drive on which httpd.exe is located
# will be used by default. It is recommended that you always supply
# an explicit drive letter in absolute paths to avoid confusion.

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path. If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk. If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
#
ServerRoot "F:/httpd-2.2-x64"

LoadModule wsgi_module modules/mod_wsgi_py27_amd64.so


#
User daemon
Group daemon

</IfModule>
</IfModule>

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
ectives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the

ServerName localhost:8000


DocumentRoot "F:/httpd-2.2-x64/htdocs
.......

#
# "/httpd-2.2-x64/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "F:/httpd-2.2-x64/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
PythonDebug ON
PythonHandler friends
加了这两行后, Apache启动失败,有谁知道是什么 原因的 ? 什么都不加又会报500 error
</Directory>

...全文
1426 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Study_Fiona 2016-12-01
  • 打赏
  • 举报
回复
怎么没人回呀
Study_Fiona 2016-11-29
  • 打赏
  • 举报
回复

2,204

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 CGI
社区管理员
  • CGI社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧