我有nginx配置:server

{

listen 80;

server_name mail.myserver.com;

rewrite ^(.*) https://$server_name$request_uri? permanent;

}

server

{

# By default we listen on all ips including ipv6 on port 443. We only respond to the server name here.

# If you have a default ssl website already comment out the next line and uncomment the one after..

listen 443;

#listen 443 ssl;

server_name mail.myserver.com;

# Our logs files.

access_log /var/log/nginx/iredmail-access.log;

error_log /var/log/nginx/iredmail-error.log;

# Startup SSL using iRedMails certs.

# If you made the ssl change above you will need to make this one to enable ssl.

ssl on;

ssl_certificate /etc/ssl/certs/iRedMail_CA.pem;

ssl_certificate_key /etc/ssl/private/iRedMail.key;

ssl_session_timeout 5m;

# We specify our root location to roundcubemail.

root /usr/share/apache2/roundcubemail/;

index index.html index.php;

# Aliasing some locations of static files.

location /iredadmin/static { alias /usr/share/apache2/iredadmin/static/;}

location /static { alias /usr/share/apache2/iredadmin/static/;}

location /awstats/icon { alias /usr/share/awstats/icon/;}

location /awstatsicon { alias /usr/share/awstats/icon/;}

# This allows webmail and roundcube as aliases to /mail/. The root is redirected to /mail.

rewrite ^/roundcubemail /mail/ permanent;

rewrite ^/webmail /mail/ permanent;

rewrite ^/$ /mail/ permanent;

# This is used to create a comparision to Apaches ability to alias that works with dynamic scripts.

location ~ /mail(.*)\.php($|/)

{

include fastcgi_params;

fastcgi_pass 127.0.0.1:9000;

#fastcgi_pass unix:/var/run/fpm-iredmail.sock;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME /usr/share/apache2/roundcubemail$1.php;

fastcgi_param SERVER_NAME $http_host;

fastcgi_ignore_client_abort on;

fastcgi_intercept_errors off;

}

location ~ /mail(.*)

{

autoindex on;

alias /usr/share/apache2/roundcubemail$1;

}

location /iredadmin {

root /usr/share/apache2/iredadmin/;

uwsgi_pass 127.0.0.1:9001;

#uwsgi_pass unix:///var/run/uwsgi/app/iredadmin/iredadmin.socket;

uwsgi_param UWSGI_PYHOME /usr/share/apache2/iredadmin/python-home;

uwsgi_param UWSGI_CHDIR /usr/share/apache2/iredadmin;

uwsgi_param UWSGI_SCRIPT iredadmin;

include uwsgi_params;

}

# Our phpMyAdmin service. Comment this section out if you don't want public access to it.

location ~ /phpmyadmin(.*)\.php($|/)

{

include fastcgi_params;

fastcgi_pass 127.0.0.1:9000;

#uwsgi_pass unix:///var/run/uwsgi/app/iredadmin/iredadmin.socket;

uwsgi_param UWSGI_PYHOME /usr/share/apache2/iredadmin/python-home;

uwsgi_param UWSGI_CHDIR /usr/share/apache2/iredadmin;

uwsgi_param UWSGI_SCRIPT iredadmin;

include uwsgi_params;

}

# Our phpMyAdmin service. Comment this section out if you don't want public access to it.

location ~ /phpmyadmin(.*)\.php($|/)

{

include fastcgi_params;

fastcgi_pass 127.0.0.1:9000;

#fastcgi_pass unix:/var/run/fpm-iredmail.sock;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$1.php;

fastcgi_param SERVER_NAME $http_host;

fastcgi_param HTTPS on;

fastcgi_param HTTP_SCHEME https;

fastcgi_ignore_client_abort on;

fastcgi_intercept_errors off;

port_in_redirect off;

}

location ~ /phpmyadmin(.*)

{

autoindex on;

alias /usr/share/phpmyadmin$1;

}

}

如果我转到/iredmail

uwsgi配置:

^{pr2}$

nginx日志:...

2013/07/30 14:47:04 [error] 15947#0: *56 open() "/usr/share/apache2/roundcubemail/favicon.ico" failed (2: No such file or directory ...

uwsgi日志:AttributeError: 'general'

Tue Jul 30 14:36:33 2013 - unable to load app 0 (mountpoint='mail.myserver.com|') (callable not found or import error)

mail.myserver.com [pid: 17788|app: -1|req: -1/2] 146.52.44.87 () {50 vars in 1421 bytes} [Tue Jul 30 14:36:33 2013] GET /iredadmin => generated 48 bytes in 9 msecs (HTTP/1.1 500) 2 headers in 63 bytes (0 switches on core 0)

Traceback (most recent call last):

File "/usr/share/apache2/iredadmin/iredadmin.py", line 9, in

from libs import iredbase

File "/usr/share/apache2/iredadmin/libs/iredbase.py", line 34, in

webmaster = cfg.general.get('webmaster', 'root')

File "/usr/lib/python2.7/dist-packages/web/utils.py", line 76, in __getattr__

raise AttributeError, k

AttributeError: 'general'

Tue Jul 30 14:41:31 2013 - unable to load app 0 (mountpoint='mail.myserver.com|') (callable not found or import error)

mail.myserver.com [pid: 17787|app: -1|req: -1/3] 146.52.44.87 () {48 vars in 1390 bytes} [Tue Jul 30 14:41:31 2013] GET /iredadmin => generated 48 bytes in 4 msecs (HTTP/1.1 500) 2 headers in 63 bytes (0 switches on core 0)

Traceback (most recent call last):

File "/usr/share/apache2/iredadmin/iredadmin.py", line 9, in

from libs import iredbase

File "/usr/share/apache2/iredadmin/libs/iredbase.py", line 34, in

webmaster = cfg.general.get('webmaster', 'root')

File "/usr/lib/python2.7/dist-packages/web/utils.py", line 76, in __getattr__

raise AttributeError, k

AttributeError: 'general'

Tue Jul 30 14:47:04 2013 - unable to load app 0 (mountpoint='mail.myserver.com|') (callable not found or import error)

mail.myserver.com [pid: 17787|app: -1|req: -1/4] 146.52.44.87 () {50 vars in 1421 bytes} [Tue Jul 30 14:47:04 2013] GET /iredadmin => generated 48 bytes in 6 msecs (HTTP/1.1 500) 2 headers in 63 bytes (0 switches on core 0)

(END)

no python application found_为什么我会得到“uWSGI Error Python application not found”?相关推荐

  1. python没有那个文件或目录_fatal error: Python.h: 没有那个文件或目录 解决方法

    今天安装scrapy 先说下环境 Ubuntu16.04 系统默认Python 2.7.12 (default, Nov 19 2016, 06:48:10) ,安装过anaconda(很关键,里面有 ...

  2. python mysql python.h_MySQLdb/_mysql.c:38:20: fatal error: Python.h: No such file or directory

    一.描述 在centos7.5中执行pip3 install mysqlclient,报如下错误 [root@VM_0_10_centos data]# pip3 install mysqlclien ...

  3. 初次使用uwsgi:no python application found, check your startup logs for errors

    按照文档,首先写一个test.py的文件,进行测试是否安装成功 1 def application(env, start_response): 2 start_response('200 OK', [ ...

  4. python bootstrap安装_python + django + bootstrap + uWSGI + nginx 环境搭建

    在了解 uWSGI 之前,我们不妨先了解一下 python http服务器? 要使 Python 写的程序能在 Web 上被访问,还需要搭建一个支持 Python 的 HTTP 服务器,列举几个如 G ...

  5. lnmp python _mysql web_Nginx+uWSGI+DJango+Python+ Mysql 搭建可靠的python web服务器

    一.安装所需工具 yum -y install gcc gcc-c++ rpm-build mysql* libtool-ltdl* libtool automake autoconf libtool ...

  6. 【NGINX】nginx+uwsgi+django+python部署总结

    (记录一下) 环境如下: 操作系统: Ubuntu 10.04 nginx: 1.0.12 uwsgi:  1.0.4 python: 2.6.5 django: 1.2.7 一.安装uwsgi 到h ...

  7. uwsgi 安装报错 plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory

    1. Python3 安装 uwsgi 报错 直接使用命令 sudo pip3 install uwsgi 安装如下错误: ubuntu@ubuntu:~/Downloads$ sudo pip3 i ...

  8. flask+uwsgi 在调试过程中让python文件的更改自动重启uwsgi

    在 uwsgi.ini文件中增加重启描述 python-autoreload=1 这样就可以在python文件变更的时候,uwsgi进程自动重启了

  9. python语言运行效率高_如何评价说PYTHON是最快的语言?

    我是视频的作者,首先感谢朋友们的关注,并且诞生了这个论题,让我可以看到大家对我视频中的观点的反馈.对于大家的讨论,在日常时间允许的条件下,我会尽量参与.下面就我目前已经看到的朋友们的评论,做一下展开. ...

最新文章

  1. Jürgen Schmidhuber回顾30年前旧作,称其启发了现今流行的很多概念
  2. 建博客的原因。。。。
  3. Rhel6服务器ftp服务配置
  4. 【OpenMP实现】任意线程数并行化快排结合Merge排序100w--10线程下只用0.06s
  5. 台式电脑不拉网线上网_在家里想不拉宽带用无线上网,试试这几招?
  6. 稀缺:百分之二的选择
  7. matlab线性拟合和非线性拟合,matlab多元非线性拟合
  8. Angular 2.x 从0到1 (五)史上最简单的Angular2教程
  9. python模块time_Python模块:time模块详解(转)
  10. python合并两个文本文件内容_利用python自带插件合并多个excle文件内容
  11. linux getit文件乱码,winzipaes文件名乱码解决方案
  12. arcgis xml 下载 切片_如何下载谷歌地球影像的 ArcGIS Server 缓存切片(瓦片)
  13. 学习|Android使用TTS语音合成
  14. 买了服务器,自己怎么搭建网站?操作步骤
  15. seo是什么,干什么用,有什么作用(二)
  16. 第一周《人月神话》读书笔记-------黄志鹏
  17. PCIe设备驱动demo
  18. 八枚硬币问题(减治法)和n枚硬币问题
  19. jpg怎么转换成png格式?四种转换方式试试看
  20. FFT求频谱图和功率谱密度图

热门文章

  1. 控制台报错:java.lang.ClassNotFoundException: javax.xml.bind.JAXBException之解决方法
  2. VirtualBox 4.3“不能为虚拟电脑 打开一个新任务”解决方案 - 转
  3. CopyTranslator(复译)-外文辅助阅读翻译解决方案
  4. 实体框架提供程序类型无法加载?
  5. jQuery获取所选单选按钮的值
  6. java 获得平台编码_关于Java平台的编码
  7. win11任务栏怎么更换颜色 win11任务栏更换颜色的设置方法
  8. pdf模板工具JaspersoftStudio,JasperReport
  9. servlet实现mvc
  10. android c++ http,开源一个C++实现的简单HTTP协议处理库