对于我的应用程序,我不得不为这个configuration工作: <IfModule mpm_prefork_module> MaxRequestsPerChild 1 </IfModule> 我可以遇到这个configuration有什么问题。
我正在完成我的第一个数据库项目。 我将设置mod_wsgi到Apache,以便我可以在我的Uni服务器上运行Python webframework。 我不确定我的Uni是否有这些工具。 我的Uni不支持Python及其configuration到他们的服务器。 我想知道一种方法来获取有关shell中服务器的信息,以便我可以决定是使用他们支持的工具(Oracle,PHP)还是我喜欢的工具(Python,MySQL)。 您可以运行哪些命令来获取有关服务器的信息,以便我可以决定使用哪些工具?
我一直在使用Debian一年,主要是作为我公司内部服务器的发行版。 现在我正在build立一个公共的电子商务网站,并计划在这个数据中心使用专门的Debian服务器。 我将接受信用卡进行支付,并直接将其传送到银行网关,而不存储任何CC信息。 我将使用Django 1.1.1,mod_wsgi,Apache2来运行django和nginx来提供静态媒体。 你认为这是一个很好的设置? 你会以服务器configuration的名义build议什么安全措施? 任何build议,链接到最佳做法和教程将不胜感激:)
我正在使用Ubuntu服务器,当我运行ps aux我得到以下进程表http://pastebin.com/NJsASBek,因为我们可以看到apache进程如下所示: www-data 26487 0.0 0.9 245476 14920? Sl 17:32 0:00 / usr / sbin / apache2 -k start 其中2687是PID。 我怎么知道我启用的网站是否属于这个过程? 这是如何定义我的apache网站http://pastebin.com/mcew79sH当然,我愿意编辑我的apache网站,如果需要的话。
我有一个活动mod-wsgi的apache2服务器,但是我不能得到环境variablesPYTHON_EGG_CACHE。 这里是我的virtualhost.conf中的重要部分: DAV svn SVNParentPath /var/svn SVNListParentPath Off WSGIProcessGroup sites WSGIApplicationGroup %{GLOBAL} SetEnv PYTHON_EGG_CACHE /var/trac/eggs AuthType Basic AuthName "Restricted SVN" AuthBasicProvider wsgi WSGIAuthUserScript /var/trac/cgi-bin/acctmgr_auth.wsgi Require valid-user 在这里acctmgr_auth.wsgi: import os, sys os.environ['PYTHON_EGG_CACHE'] = PYTHON_EGG_CACHE from trac.env import open_environment, Environment acct_mgr = None def check_password(environ, user, password): global acct_mgr # Try loading the env from the global […]
我试图设置我的Django应用程序与modwsgi在Apache下运行。 我已经定义了以下虚拟主机: <VirtualHost *> ServerName www.domain.com ServerAlias domain.com WSGIScriptAlias / /home/domain/apache/django.wsgi <Directory /home/domain/apache> Order deny,allow Allow from all Options -Indexes +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [QSA,L,R=301] </Directory> </VirtualHost> 最后的重写规则是使www.domain.com成为规范的站点名称。 虽然有一些错误 当我浏览到http://domain.com时 ,我被redirect到http://www.domain.com/django.wsgi/ 。 浏览> http://www.domain.com工作得很好。 我在configuration中丢失了什么? 谢谢。 更新:我改变了RewriteRule RewriteRule ^django.wsgi/(.*)$ domain.com/$1 [L,R=301]. 这个改变解决了这个问题。 如果有人能详细说明为什么/django.wsgi/部分在URL中结束,我将不胜感激。 谢谢!
我有一台运行Ubuntu Server 10.04LTS的虚拟机。 我的意图是这台机器像一个VPS一样工作,这样我就可以学习和准备当我得到一个VPS服务。 用于部署Django应用程序的Apache + mod_wsgi似乎是我的正确select。 我有域名(marianofalcon.com.ar),但没有别的,没有DNS。 问题是,我所有的部署东西都迷失了方向。 我知道如何configurationmod_wsgi(带有django.wsgi文件)和apache(创build一个VirtualHost)。 有东西丢失,我不知道它是什么。 我认为我缺乏networking技能,这是最大的问题。 尝试在虚拟机上托pipe应用程序会增加一些难度,因为我不太清楚要使用哪个IP。 这是我得到的: 文件放置在:/ etc / apache2 / sites-available: NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin [email protected] ServerName www.my-domain.com ServerAlias my-domain.com Alias /media /path/to/my/project/media DocumentRoot /path/to/my/project WSGIScriptAlias / /path/to/your/project/apache/django.wsgi ErrorLog /var/log/apache2/error.log LogLevel warn CustomLog /var/log/apache2/access.log combined </VirtualHost> django.wsgi文件: import os, sys wsgi_dir = os.path.abspath(os.path.dirname(__file__)) project_dir = […]
我有一个已经有apache和wsgi工作的Ubuntu 10.04服务器。 我也有一个python脚本,使用make_server命令可以很好地工作: if __name__ == '__main__': from wsgiref.simple_server import make_server srv = make_server('', 8080, display_status) srv.serve_forever() 现在我想让页面始终处于活动状态,而无需手动运行脚本。 我看着Moin在做什么。 我在apache2.conf中find这些行: WSGIScriptAlias /wiki /usr/local/share/moin/moin.wsgi WSGIDaemonProcess moin user=www-data group=www-data processes=5 threads=10 maximum-requests=1000 umask=0007 WSGIProcessGroup moin 和moin.wsgi是列出的: import sys, os sys.path.insert(0, '/usr/local/share/moin') from MoinMoin.web.serving import make_application application = make_application(shared=True) 问题:我可以在apache2.conf中创build一个指向另一个wsgi文件的类似的部分吗? 喜欢这个: WSGIScriptAlias /status /mypath/status.wsgi WSGIDaemonProcess status user=www-data group=www-data […]
我有一个构build在Flask框架上的小型python web应用程序,并使用mod_wsgi将其部署到apache。 应用程序正在安排每隔几分钟运行一次apscheduler的后台任务。 从Apache的错误日志,我一直在观察一个错误。 这个错误似乎是在后台任务运行的时候抛出的,但是在之前或之后是不一致的,而且经常会出现在多次之后。 这是错误: Exception ignored in: <module 'threading' from '/usr/local/lib/python3.4/threading.py'> Traceback (most recent call last): File "/usr/local/lib/python3.4/threading.py", line 1289, in _shutdown assert tlock is not None AssertionError: 那个来自python本身的代码是这样的: def _shutdown(): # Obscure: other threads may be waiting to join _main_thread. That's # dubious, but some code does it. We can't wait for […]
我目前正尝试在CentOS 7上将mod_wsgi 4.4.21安装到Apache 2.4的Python 3.5 web服务器上。 在“ 快速安装指南 ”中的“configuration源代码”中,它表示: 在某些Linux发行版(如SUSE和CentOS)上,必须使用“–with-apxs”选项并指定“/ usr / sbin / apxs2-worker”或“/ usr / sbin / apxs2-prefork” 。 据我所知,这些应该是与httpd-devel包。 我已经安装了: # rpm -qa | grep httpd httpd-tools-2.4.6-40.el7.centos.x86_64 httpd-manual-2.4.6-40.el7.centos.noarch httpd-2.4.6-40.el7.centos.x86_64 httpd-devel-2.4.6-40.el7.centos.x86_64 但是我在/usr/sbin没有apxs2-worker或apxs2-prefork : # ls /usr/sbin/apxs* ls: cannot access /usr/sbin/apxs*: No such file or directory 但是,我确实在/usr/bin有apxs 。 我可以使用那个,还是有什么我失踪?