【问题标题】:Deploy Bottle Application on Nginx在 Nginx 上部署 Bottle 应用
【发布时间】:2012-12-19 04:48:50
【问题描述】:

我有一个 Ubuntu 12.04 服务器设置,当前在 Passenger / Nginx 安装上运行 Ruby on Rails 应用程序。我决定使用一些 Python 并使用 Bottle 编写一个小应用程序。我想将此应用程序部署到我的服务器。 我关注this guide 设置我的服务器以运行 Python 应用程序。当我运行 sudo service uwsgi restart 时,我收到以下错误消息:

Restarting app server(s) uwsgi                                     
[uWSGI] getting INI configuration from  
/usr/share/uwsgi/conf/default.ini [uWSGI] parsing config file /etc/uwsgi/apps-enabled/example.net.xml  
open("./python_plugin.so"): No such file or directory [core/utils.cline 4700]
!!! UNABLE to load uWSGI plugin: ./python_plugin.so: cannot  open shared object file: No such file or directory !!!   
Sat Dec  8 18:29:14 2012 - [WARNING] option "app" is deprecated: use the more advanced "mount" option

我真的不太了解 Python,我已经通过easy_install 安装了我需要的插件

分别是:

  • pymongo
  • 美丽的汤

我的问题是:如何将这个简单的应用程序部署到我的服务器上?
谢谢

【问题讨论】:

  • 您能否验证python_plugin.so 存在于/usr/lib/uwsgi/plugins/python 中并且访问权限是否合适?
  • 作为一般规则,尽可能使用pip 而不是easy_install 安装模块 - 相信我,它会为您省去未来的痛苦。
  • @Raber 当我列出它时,它就出现在-rw-r--r-- 1 root root 142936 Jul 17 02:28 python27_plugin.so lrwxrwxrwx 1 root root 37 Dec 10 16:39 python_plugin.so -> /etc/alternatives/uwsgi-plugin-python
  • 我尝试通过pip 重新安装uwsgi,但我遇到了同样的问题

标签: python ubuntu nginx bottle


【解决方案1】:

我发现Passenger 将运行WSGI 应用程序。我按照这篇文章http://kbeezie.com/using-python-nginx-passenger/ 上的说明进行操作,并且没有遇到任何问题。

最后其实很简单。

这是我的适配器,以防其他人遇到问题:

https://github.com/nick-desteffen/astronomy-pics/blob/master/passenger_wsgi.py

【讨论】:

    猜你喜欢
    • 2016-04-15
    • 2012-09-02
    • 2020-01-21
    • 2013-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-14
    相关资源
    最近更新 更多