Articles of mod wsgi

设置Apache + mod_wsgi:不正确的function

我试图在Windows机器上设置一个Apache的http服务器与mod_wsgi,但是当我启动服务,它无法启动。 在Windows事件日志中,我收到以下消息: The Apache2 service terminated with the following service-specific error: Incorrect function. 在运行一个Windows 8 – 64位机,与 Apache 2.0.64 32位 Python 2.7.8 32位 mod_wsgi 3.5 32位 我环顾networking,但所有的问题,但到处都说,这是一个软件的架构的问题,但我已经安装了所有的32位版本。

WSGI:从守护进程收到截断或超大的响应头

系统configuration:Apache2,Django 1.10,Python 3,Ubuntu 16.04 LTS Django debug=True 。 /var/log/apache2/error.log [52:53.057967] [wsgi:error] [pid 4303] [client 1.1.1.22:24409] Timeout when reading response headers from daemon process 'example.org': /home/user/dir/project/main_app/wsgi.py [52:58.466726] [wsgi:error] [pid 4305] [client 1.1.1.10:9787] Truncated or oversized response headers received from daemon process 'example.org': /home/user/dir/project/main_app/wsgi.py [52:58.466729] [wsgi:error] [pid 4304] [client 1.1.1.4:18417] Truncated or oversized response headers received from […]

KeepAliveclosures时的Apache MaxClients设置

用apache,当KeepAliveclosures时减lessMaxClients是合理的吗? 目前,MaxClients被设置为150,这是mpm-worker的默认值。 nginx提供静态文件和反向代理到Apache 我们每秒平均需要12-15个请求 四核心盒上的CPU负载平均值不会超过0.8 谢谢!

apache'指定的模块找不到。 '错误

当我启动Apache服务时,我收到了这条消息 名为Apache的服务报告了以下错误: httpd.exe:第128行的C:/data/apache/conf/httpd.conf中的语法错误:无法将C:/data/apache/modules/mod_wsgi.so加载到服务器中:指定的模块找不到。 。 不知道出了什么问题,我确实有“C:/data/apache/modules/mod_wsgi.so” 谢谢你的帮助。

Django部署Reccomendations

我有一个以SaaS方式提供的Web应用程序…(每个客户都有自己的子域和他自己的数据库)。 我的应用程序使用Django Python和Postgresql。 现在是在一个Linux共享托pipe计划,使用Apache和mod_wsgi托pipe,但我下个月迁移到一个Linux VPS,并已阅读有关Nginx和Gunicorn(也uwsgi)是一个更好的方式去…我想了解您关于部署django的build议。 我主要是开发人员,所以我有一个系统pipe理员的背景。

如何在非根位置configuration带有mod_wsgi和Apache的ReviewBoard

我试图在安装了Python 2.5和mod_wsgi 3.3的Mac OS X Leopard(10.5.8)上configurationReviewBoard 。 我使用的是SQLite和OS X附带的标准Apache 2; 文档根目录位于/Library/WebServer/Documents/ 。 由于我的机器已经在这个根目录中的其他path上承载了一些其他的东西,我想在一个path服务ReviewBoard而不是服务器的根。 我创build了一个站点,设置了必要的所有者和权限,链接了Apacheconfiguration文件,并删除了作为服务器根目录的行。 这是我的conf/apache_wsgi.conf : WSGIScriptAlias "/reviewboard" "/Library/WebServer/Documents/reviewboard/htdocs/reviewboard.wsgi" <Directory "/Library/WebServer/Documents/reviewboard/htdocs"> AllowOverride All </Directory> # Alias static media requests to filesystem Alias /reviewboard/media "/Library/WebServer/Documents/reviewboard/htdocs/media" 但是,我无法得到ReviewBoard上来,只有404错误页面。 当我在conf / settings_local.py中有以下内容时: SITE_ROOT = '/reviewboard/' FORCE_SCRIPT_NAME = '' DEBUG = True 我访问http://example.com/reviewboard/ ,我在Apache访问日志中获得以下内容: "GET /reviewboard/ HTTP/1.1" 404 1923 并在浏览器中使用以下内容的404页面: […]

Django Apache WSGI – 生产服务器非常慢

我在这个上挠头。 Django安装在我的生产和开发服务器上,但是在非重载的情况下运行的服务器运行速度非常慢。 每个页面有时需要超过30秒。 这里是我的Apache网站 – 可用/ example.com文件: <VirtualHost *:80> ServerName www.example.com ServerAdmin [email protected] <Directory /var/www/sites/example.com> Order Deny,Allow Allow from all </Directory> WSGIDaemonProcess example.com user=example group=example threads=25 WSGIProcessGroup example.com WSGIScriptAlias / /var/www/sites/example.com.wsgi Alias /media /var/www/sites/example.com/media <Directory /var/www/sites/example.com/media> Order Deny,Allow Allow from all </Directory> </VirtualHost> 这是我在我的wsgi文件中 #!/usr/bin/env python project = "fishpond" sitename = "www.fishpond.ie" envpath = "/var/www/env/dev.fishpond.ie/lib/python2.6/site-packages" […]

Apache在启动后几秒钟崩溃

我有一个与Apache的问题。 当我尝试启动它(/etc/init.d/apache2启动)它几秒钟后死亡。 它出现在“ps aux”消耗大量内存然后死亡。 我不知道是什么可能导致apache消耗这些内存: USER PID%CPU%MEM VSZ RSS TTY STAT START TIME COMMAND root 13379 1.0 0.3 14376 3908? Ss 22:31 0:00 / usr / sbin / apache2 -k start www-data 13383 0.0 0.4 197316 4196? Sl 22:31 0:00 / usr / sbin / apache2 -k start www-data 13390 0.0 0.3 172728 4172? Sl […]

使用mod_wsgi部署Django

/etc/apache2/site-available/mysite.com <VirtualHost my_ip_here:80> ServerAdmin [email protected] ServerName mysite.com ServerAlias www.mysite.com WSGIScriptAlias / /srv/www/mysite.com/djangoproject/django.wsgi <Directory "/srv/www/mysite.com/djangoproject/sitestatic"> Order allow,deny Allow from all </Directory> AliasMatch /([^/]*\.css) /srv/www/mysite.com/djangoproject/sitestatic/css/$1 AliasMatch /([^/]*\.js) /srv/www/mysite.com/djangoproject/sitestatic/js/$1 Alias /media/ /srv/www/mysite.com/djangoproject/sitestatic/ ErrorLog /srv/www/mysite.com/logs/error.log CustomLog /srv/www/mysite.com/logs/access.log combined </VirtualHost> /srv/www/mysite.com/djangoproject/settings.py MEDIA_ROOT = '' MEDIA_URL = '/media/' STATIC_ROOT = '/srv/www/mysite.com/djangoproject/sitestatic/' STATIC_URL = '/static/' ADMIN_MEDIA_PREFIX = '/static/admin/' 其实我看到我的网站正确与我的CSS和图像, 但是当我去/pipe理我看到没有CSS的pipe理网站。 我该如何解决? 另外,这是正确的我的服务CSS和JS的Apacheconfiguration,我怎样才能隐藏目录/媒体的内容? […]

用SELinux启用mod_wsgi(有没有办法?)

我最近遇到了一些问题,最近由于SELinux部署了使用mod_wsgi的Django。 世界通常会得到“权限被拒绝”的错误(403)。 这是通过禁用SELinux解决的。 在启用SELinux的情况下有没有办法使用mod_wsgi? 现在,如果我要将我的djcode文件夹移动到/ usr / local /这将工作,但如果djcode文件夹存储在/ usr / local / src / djcode,它会再次给我这个错误。 Cannot load /etc/httpd/modules/mod_wsgi.so into server: /etc/httpd/modules/mod_wsgi.so: cannot restore segment prot after reloc: Permission denied 我看了一些日志,它说: SElinux is preventing the httpd from using potentially mislabel files ./src (src_1) 那么我怎样才能让httpd使用src文件夹呢?