新人求助,利用Python编写CGI,Windows配置好Apache, 但报错
apache吧
全部回复
仅看楼主
level 1
利用Python编写CGI,Windows配置好Apache, 但是浏览器提示错误如下:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
这是日志文件的错误
::1 - - [25/Aug/2021:17:56:20 +0800] "GET /cgi-bin/hello.py HTTP/1.1" 500 530
::1 - - [25/Aug/2021:17:56:25 +0800] "GET /cgi-bin/hello.py HTTP/1.1" 500 530
这是我的文件
#!E:\pycharm\PyCharm Community Edition 2020.3.3\bin\pycharm64.exe
# -*- coding: UTF-8 -*-
print ("Content-type:text/html")
print # 空行,告诉服务器结束头部
print ('<html>')
print ('<head>')
print ('<meta charset="utf-8">')
print ('<title>Hello World - 我的第一个 CGI 程序!</title>')
print ('</head>')
print ('<body>')
print ('<h2>Hello World! 我的第一个CGI程序</h2>')
print ('</body>')
print ('</html>')
请问是哪里的问题啊,萌新实在找不到原因....
2021年08月25日 10点08分 1
level 1
可以一起自学python,自学qq群:703141293
2021年09月22日 14点09分 2
level 1
FuturePython您自学的朋友,自学python最佳的途径,课程包括python基础系列、python爬虫系列、scrapy系列、mysql系列、django系列等,体系完整,完全可以满足您的自学需求。同时课程为纯义务性,不会中途收费,答疑收费的情况,学习过程中的报错都可以解决,不会让你自学路途痛苦,感兴趣的同学赶紧去看一下,课程链接:https://space.bilibili.com/1663262478,记得关注B站账号不迷路,官方论坛:http://www.futurepy.com/
2021年09月23日 08点09分 3
1