我可以在 Apache 服务器上运行 Bottle.py 而不会中断我的 PHP 应用程序吗?

发布于 2024-10-07 07:15:48 字数 306 浏览 0 评论 0原文

最近刚拿起 Python 后,我很想在我的网络服务器上运行它。

我选择 Bottle.py 是因为它看起来简单、易于访问且包含在内。我对网络服务器的工作原理(如何使用它们)知之甚少,而且如果不需要的话我不愿意使用我的服务器的 Apache,因为它已经托管了一个非常活跃的留言板。

Bottle 的文档似乎假设了我没有的服务器/python 理解的一两个步骤,因为一旦我已经将 Bottle.py 复制到我的文档根目录,我什至不确定将实际的路由/网站内容放在哪里。或者当我访问“mydomain.com”时服务器如何知道运行 Bottle (或执行 python)。

I'm antsy to get Python running on my webserver after just recently picking it up.

I chose Bottle.py because it looks simple, accessible, and contained. I have very little experience with or knowledge of how exactly webservers work (how to mess with them) and I'm reluctant to play with my server's Apache if I don't need to since it hosts a very active message board already.

Bottle's documentation seemed to assume a step or two of server/python understanding that I don't have, as I'm not even sure where to put the actual routes/website content once I already have bottle.py copied over to my doc root. Or how the server knows to run bottle (or execute python) when I go to "mydomain.com".

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

尹雨沫 2024-10-14 07:15:48

在 WSGI 容器(例如 mod_wsgi)中运行它。

Run it in a WSGI container such as mod_wsgi.

划一舟意中人 2024-10-14 07:15:48

您还可以运行 Apac 作为应用程序的代理。我相信使用 mod_proxy 会让你到达那里。我自己运行一个 nginx 前端作为 bjoern 上运行的 Bottle 应用程序的反向代理。 Bjoern 本身非常有能力运行 Bottle 应用程序,所以我不想使用 mod_wsgi 和类似的东西。

You can also run Apace as a proxy to your application. I believe using mod_proxy would get you there. I myself run a nginx front end as reverse proxy to a bottle application running on bjoern. Bjoern itself is quite capable of running the bottle app, so I didn't want to use mod_wsgi, and similar stuff.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文