简体   繁体   English

在Python中使用APACHE HTTP服务器和CGI脚本的动态网站

[英]Dynamic website using APACHE HTTP server and CGI script in Python

I have been reading about APACHE server and CGI scripts. 我一直在阅读有关APACHE服务器和CGI脚本的信息。 As per my understanding I can create a website if I have an APACHE HTTP server version 2.4 and write CGI scripts using Python. 根据我的理解,如果我拥有APACHE HTTP服务器版本2.4,则可以创建一个网站,并使用Python编写CGI脚本。 Let say I have a registered domain name with DNS and have a server where APACHE HTTP server 2.4 is installed and configured to run CGI scripts. 假设我在DNS中注册了一个域名,并且有一台安装了APACHE HTTP服务器2.4并配置为运行CGI脚本的服务器。 I also have python installed on it. 我也安装了python。 Can I create a basic dynamic content generating web site by writing CGI scripts in Python? 我可以通过用Python编写CGI脚本来创建基本的动态内容生成网站吗?

Yes that's possible. 是的,那是可能的。 CGI is an old webserver interface used to execute programs on the server side. CGI是旧的网络服务器界面,用于在服务器端执行程序。 This includes compiled programs and all sorts of scripts. 这包括编译的程序和各种脚本。

Nowadays CGI isn't very popular anymore. 如今,CGI不再流行。 Mostly because of bad performance and security issues. 主要是由于不良的性能和安全性问题。 If you want to execute Python code behind an Apache webserver consider using mod_wsgi . 如果要在Apache网络服务器后面执行Python代码,请考虑使用mod_wsgi

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM