我正在尝试将Python设置为在mac上的本地apache服务器上运行。在
在httpd.conf
上,我已经
<VirtualHost *:80>
DocumentRoot "/Users/ptamzz/Sites/python/sandbox.ptamzz.com"
<Directory "/Users/pritams/Sites/python/sandbox.ptamzz.com">
Options Indexes FollowSymLinks MultiViews ExecCGI
AddHandler cgi-script .py
Require all granted
</Directory>
DirectoryIndex index.py
ServerName sandbox.ptamzz.com
ErrorLog "/var/log/apache2/error-log"
CustomLog "/var/log/apache2/access-log" common
</VirtualHost>
在我的文档根目录上,我的index.py
文件是
但是当我在浏览器上加载页面时,python代码会按原样返回。
我错过了什么?在
在Apache(cgi)中执行python
系统:OSX yosmite 10.10.3,默认apache
在http配置中取消注释
虚拟主机条目
^{pr2}$索引.py文件
文件已使用
重新启动apache并输出
相关问题 更多 >
编程相关推荐