1 / 4
文档名称:

Linux+Django+Python+Wsgi配置过程.docx

格式:docx   大小:26KB   页数:4页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

Linux+Django+Python+Wsgi配置过程.docx

上传人:老狐狸 2022/6/12 文件大小:26 KB

下载得到文件列表

Linux+Django+Python+Wsgi配置过程.docx

文档介绍

文档介绍:一.安装环境
Linux 下配置 Apache+Mod_Wsgi+Django 环境
(ybw 2021-09-23)
操作系统:CentOS release
内核版本:Linux Svn-168-1-11 “, “copyright“, “credits“ or “license“ for more information.
>>> import django
>>> (1, 2, 4, ”final”, 0)
>>> import MySQLdb
>>>
shell>ls /etc/ d/
README
shell> ls /etc/ d/modules/ | grep mod_wsgi
三.工程部署
打包压缩开发代码:
上传至效劳器并解压缩至名目/var/www/html Shell> ls /var/www/html/
dajie
<VirtualHost *:80>
ServerName -inc DocumentRoot /var/www/html/dajie
WSGIScriptAlias / /var/www/html/dajie/apache/
<Directory />
Order deny,allow Allow from all
</Directory>
<Directory /apache>
Allow from all
</Directory>
</VirtualHost>
修改 Apche 配置文件 Shell> vi /etc/ d/conf/ ###在最终添加如下内容
创立并配置 wsgi 的配置文件:
Shell>cd /var/www/html/dajie
Shell>mkdir apache Shell>touch Shell>cat
import os, sys
#Calculate the path based on the location of the WSGI script.
apache_configuration= ( file ) project = (apache_configuration) workspace = (project) (workspace)
[”DJANGO_SETTINGS_MODULE”] = ””
[”PYTHON_EGG_CACHE”] = ”/tmp”
import
application = d