15,076
edits
mNo edit summary |
mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
Run python on Windows/Apache | Run python on Windows [https://httpd.apache.org/ Apache HTTP Server] | ||
== Troubleshooting == | == Troubleshooting == | ||
| Line 6: | Line 6: | ||
* Apache 設定檔對應的資料夾 Options 有加上{{kbd | key=<nowiki>ExecCGI</nowiki>}} 該行設定範例 {{kbd | key=<nowiki>Options Indexes FollowSymLinks ExecCGI</nowiki>}} | * Apache 設定檔對應的資料夾 Options 有加上{{kbd | key=<nowiki>ExecCGI</nowiki>}} 該行設定範例 {{kbd | key=<nowiki>Options Indexes FollowSymLinks ExecCGI</nowiki>}} | ||
* Apache 設定檔 AddHandler 部分有加上{{kbd | key=<nowiki>.py</nowiki>}} 該行設定範例 {{kbd | key=<nowiki>AddHandler cgi-script .cgi .py</nowiki>}} | * Apache 設定檔 AddHandler 部分有加上{{kbd | key=<nowiki>.py</nowiki>}} 該行設定範例 {{kbd | key=<nowiki>AddHandler cgi-script .cgi .py</nowiki>}} | ||
修改 Apache 設定檔後,需要重新啟動 Apache 網站服務 | |||
=== Error message: End of script output before headers: python_script.py (Server 500 error) === | === Error message: End of script output before headers: python_script.py (Server 500 error) === | ||