初始状态:默认的WAMP配置
- LoadModule cgi_module modules/mod_cgi.so
动作:(httpd.conf中)
1,中(后面添加ExecCGI):
- Options Indexes FollowSymLinks ExecCGI
2,中:
- # AddHandler allows you to map certain file extensions to "handlers":
- # actions unrelated to filetype. These can be either built into the server
- # or added with the Action directive (see below)
- #
- # To use CGI scripts outside of ScriptAliased directories:
- # (You will also need to add "ExecCGI" to the "Options" directive.)
- #
- AddHandler cgi-script .cgi .py
- #!D:\Python27\python.exe
- print "Content-type:text/html"
- print
- print "hello world"