apache2.4 windows764 python cgi
修改conf下的httpd.conf;
1:Listen和ServerName修改为相同的端口号,如8066
2:ScriptAlias就让他留在原位置,"${SRVROOT}/cgi-bin/"这个值不用改就好。但是要把脚本文件如.py文件放到例如D:/Apache24/cgi-bin目录下。
3:${SRVROOT}/的意思就是D:/Apache24/
4:ScriptAlias下面的第一个Directory节点,值和ScriptAlias的值相同,都是"${SRVROOT}/cgi-bin",但是少一个"/";
5:此Directory节点中内容如下:
<Directory "${SRVROOT}/cgi-bin">
Options +ExecCGI
AllowOverride None
Require all granted
</Directory>
7:运行ServerName + ${SRVROOT}/cgi-bin/+脚本文件名.后缀
例如:http://localhost:8066/cgi-bin/index.py
8:脚本文件内容:
#!c:\python34\python.exe
# -*- coding: UTF-8 -*-
print ("Content-type:text/html\r\n\r\n")
print ('<html>')
print ('<head>')
print ('<title>Hello Word - First CGI Program</title>')
print ('</head>')
print ('<body>')
print ('<h2>Hello Word! This is my first CGI program</h2>')
print ('</body>')
print ('</html>')
apache2.4 windows764 python cgi的更多相关文章
- Apache运行python cgi程序
Apache运行python cgi程序 环境 win10 x64 专业版 Apache2.4 python 2.7 Apache安装和配置 Apache服务器的安装请自行搜索.在Apache2.4中 ...
- Python CGI编程和CGIHTTPServer
Python2.7 的CGIHTTPServer 可以作为一个简单的HTTP服务器,能够调用cgi脚本 1 在任意目录下创建一个特殊的目录 cgi-bin ,用于存放自己写的脚本(.py或.cgi) ...
- Windows 配置 Apache Python CGI
提示:安装Apache可参考 https://jingyan.baidu.com/article/0eb457e53c019f03f1a905c7.html 1. 打开URL: https://ww ...
- Configuration python CGI in XAMPP in win-7
1.After install XAMPP,we need add the path of the Mysql just find the path and add it to your sys-pa ...
- Python CGI编程(转自易百)
Python CGI编程 Python的CGI编程,公共网关接口或CGI,Web服务器和一个自定义的脚本之间交换信息是一组定义的标准. 什么是CGI ? 公共网关接口或CGI,Web服务器和一 ...
- [Python]python CGI脚本在apache服务器上运行时出现“Premature end of script headers”错误
在测试自己的python CGI脚本时, 当html网页中的表单form内容传送到服务器python脚本时, 总是出现Premature end of script headers错误, 网页显示是服 ...
- Configure Tomcat 7 to run Python CGI scripts in windows(Win7系统配置tomcat服务器,使用python进行cgi编程)
Pre-installation requirements1. Java2. Python steps1. Download latest version of Tomcat (Tomcat 7) f ...
- python CGI编程-----简单的本地使用(1)
本章节需要安装python开发工具,window平台安装地址:https://www.python.org/downloads/windows/,linux安装地址:https://www.pytho ...
- wamp+python+CGI+wingIDE
一.环境配置情况 windows7 32位 wamp2.5 python3.5.2 wingIDE5.1.12 上述软件下载安装按照自己的意愿行事. 二.配置 wamp支持cgi和python: ...
随机推荐
- Spring中scope作用域
scope作用域: 1.prototype 2.request 3.session 4.singleton 5.global session 1.prototype(多例) prototyp ...
- vim 长句子中的上下移动
当一个句子很长的时候,屏幕显示不下,就会分为多行,这个时候,你又想找到中间几行某部分的字母,怎么办?这个时候,先按下一个 g ,在按下 j / k ,就可以实现长句子的上下移动了.
- *HDU3339 最短路+01背包
In Action Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total S ...
- JS创建缩略图
<script language="javascript"> //显示缩略图 function DrawImage(ImgD,width_s,height_s){ /* ...
- 不修改代码就能优化ASP.NET网站性能的一些方法
阅读目录 开始 配置OutputCache 启用内容过期 解决资源文件升级问题 启用压缩 删除无用的HttpModule 其它优化选项 本文将介绍一些方法用于优化ASP.NET网站性能,这些方法都是不 ...
- MongoDB数据库的操作,增删改查
在student集合中插入一些数据 db.student.insert({ "学号":10010, "姓名":"德莱文", "年龄 ...
- Javascript实现页面跳转的几种方式
概述 相信很多Web开发者都知道,在开发Web程序的时候,对于页面之间的跳转,有很多种,但是有效的跳转则事半功倍,下面就是我在平时的开发过程中所用到的一些JavaScript跳转方式,拿出和大家共享一 ...
- 过滤关键字防止XSS攻击
public static string ClearXSS(string str) { string returnValue = str; if (string.IsNullOrEmpty(retur ...
- vsftp 搭建及虚拟账号配置
安装vsftpd yum -y install vsftpd chkconfig vsftpd on 修改主配置文件 vi /etc/vsftpd/vsftpd.conf # 允许匿名用户登陆,登陆时 ...
- caffe中的BatchNorm层
在训练一个小的分类网络时,发现加上BatchNorm层之后的检索效果相对于之前,效果会有提升,因此将该网络结构记录在这里,供以后查阅使用: 添加该层之前: layer { name: "co ...