如何在apache服务器上使用C++ [英] How to use C++ for apache server

查看:63
本文介绍了如何在apache服务器上使用C++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以将 php、perl、python 与 apache 集成并在其中构建站点.

We can integrate php, perl, python with apache and build sites in them.

是否也可以在 apache 中使用 C/C++ 并在其中构建网站?

Is it also possible to use C/C++ with apache and build web sites in it?

推荐答案

它有效.

您可以使用 CGI 执行基本操作:对于对您站点上的地址的每个请求,Apache 都会使用给定的可执行文件启动一个新进程.此可执行文件可以是 C++.缺点是为每个请求创建一个新进程.为了获得更好的结果,您可以使用 FastCGI,其中 CGI 进程可以针对多个不同的请求运行.

You can do basic stuff using CGI: for every request to an address on your site, Apache starts a new process with a given executable. This executable can be C++. Disadvantage is that a new process is created for every request. For better results, you can use FastCGI, where the CGI process can run for several different requests.

对于使用 C++ 编写的高级网站(阅读 Web 2.0),请查看 Wt.

For advanced sites (read web 2.0) in C++, have a look at Wt.

这篇关于如何在apache服务器上使用C++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆