#tree -d server/ server/ |-- __init__.py |-- manage.py |-- settings.py |-- backend |-- static | |-- images | |-- locale | |-- plugins | `-- themes | |-- default | | `-- images | |-- gray | | `-- images | `-- icons |-- template `-- view
#cat /etc/httpd/conf.d/wsgi.conf LoadModule wsgi_module modules/mod_wsgi.so WSGIScriptAlias / "/var/www/html/server/django.wsgi" <Directory "/var/www/html/server"> Order Deny,Allow Allow from all </Directory>
#cat /var/www/html/server/django.wsgi # -*- coding: utf-8 -*- import os import sys os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' os.environ['PYTHON_EGG_CACHE'] = '/tmp/.python-eggs' current_dir = os.path.dirname(__file__) if current_dir not in sys.path: sys.path.append(current_dir) import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler()
WSGIScriptAlias / "/var/www/html/server/test.wsgi"
TEMPLATE_DIRS = ("/var/www/html/server/template",)
<span style="font-family: 'times new roman', times;">WSGIScriptAlias /path /path-to-wsgi</span>
#启动WSGI后台,site1是后台名字
WSGIDaemonProcess site1 processes=1 threads=15 display-name=%{GROUP}
#分配当前上下文应该使用哪个WSGI后台,可以放在Location里面指定
WSGIProcessGroup site1
#根据当前上下文的ProcessGroup分配到对应的后台
WSGIScriptAlias /path /path-to-wsgi
WSGIDaemonProcess example threads=25 wsgi.multithread True wsgi.multiprocess False
WSGIDaemonProcess example processes=1 threads=25 wsgi.multithread True wsgi.multiprocess True
WSGIDaemonProcess example processes=2 threads=25 wsgi.multithread True wsgi.multiprocess True
WSGIDaemonProcess example processes=5 threads=1 wsgi.multithread False wsgi.multiprocess True
<span style="font-family: 'times new roman', times;">WSGIDaemonProcess default processes=1 threads=1 display-name=%{GROUP}
WSGIProcessGroup default
WSGIScriptAlias /project1 “/home/website/project1.wsgi”
WSGIScriptAlias /project2 “/home/website/project2.wsgi”</span>
<span style="font-family: 'times new roman', times;">WSGIDaemonProcess site1 processes=1 threads=1 display-name=%{GROUP}
WSGIDaemonProcess site2 processes=1 threads=1 display-name=%{GROUP}
<Location “/project1″>
WSGIProcessGroup site1
</Location>
WSGIScriptAlias /project1 “/home/website/project1.wsgi”
<Location “/project1″>
WSGIProcessGroup site2
</Location>
WSGIScriptAlias /project2 “/home/website/project2.wsgi”</span>
processes=n threads=1
processes=2 threads=64
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有