Ubuntu系统使用apache部署多个django项目(python4.3)
/etc/apache2/sites-available/pyweb.conf
<VirtualHost *:>
ServerName 192.168.1.46
DocumentRoot /var/www/pyweb/pyweb
<Directory /var/www/pyweb/pyweb>
Order allow,deny
Allow from all
</Directory>
WSGIScriptAlias / /var/www/pyweb/pyweb/wsgi.py ErrorLog ${APACHE_LOG_DIR}/error_81.log
CustomLog ${APACHE_LOG_DIR}/access_81.log combined
</VirtualHost>
/etc/apache2/ports.conf
NameVirtualHost *:
Listen NameVirtualHost *:
Listen <IfModule ssl_module>
Listen
</IfModule> <IfModule mod_gnutls.c>
Listen
</IfModule>
参考:
http://www.cnblogs.com/helloworldtoyou/p/5978977.html
http://www.cnblogs.com/codemyzen/p/3690042.html
http://blog.csdn.net/o_surface_o/article/details/23278837
http://www.jianshu.com/p/b40a4a12fff1
http://blog.csdn.net/gamer_gyt/article/details/52135349
防火墙问题请参考:
http://www.cnblogs.com/jiangyao/archive/2010/05/19/1738909.html
Django静态文件配置
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.11/howto/static-files/
# 当运行 python manage.py collectstatic 的时候
# STATIC_ROOT 文件夹 是用来将所有STATICFILES_DIRS中所有文件夹中的文件,以及各app中static中的文件都复制过来
# 把这些文件放到一起是为了用apache等部署的时候更方便
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
<VirtualHost *:>
ServerName 192.168.1.105
DocumentRoot /var/www/cn/acn
<Directory /var/www/cn/acn>
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/cn/static>
Require all granted
</Directory>
Alias /static /var/www/cn/static
WSGIScriptAlias / /var/www/cn/acn/wsgi.py ErrorLog ${APACHE_LOG_DIR}/error_81.log
CustomLog ${APACHE_LOG_DIR}/access_81.log combined
</VirtualHost>
Ubuntu系统使用apache部署多个django项目(python4.3)的更多相关文章
- ubuntu下在apache部署python站点
ubuntu下在apache部署python站点 我的是ubuntu14 32为的虚拟机,默认安装的python为3.4 环境:apache + mysql + django + python3 软件 ...
- Ubuntu系统---终端下用g++进行c++项目
Ubuntu系统---终端下用g++进行c++项目 目录 一.编译工具(g++/gcc)和编辑工具(vim/gedit)二.C语言 的编译与运行三.C++语言 的编译与运行四.gcc/g++的详细过程 ...
- 【Django】Apache上运行单个Django项目,mod_wsgi配置
1 安装环境 操作系统:Ubuntu 12.04 LTS 32 位(安装在VMware虚拟机中) python 版本: Python 2.7.3 Django版本 >>> djang ...
- 服务器部署 Vue 和 Django 项目的全记录
本篇记录我在一个全新服务器上部署 Vue 和 Django 前后端项目的全过程,内容包括服务器初始配置.安装 Django 虚拟环境.python web 服务器 uWSGI 和反向代理 Nginx ...
- Ubuntu系统启用Apache Mod_rewrite模块
在终端中执行 sudo a2enmod rewrite 指令后,即启用了 Mod_rewrite 模块. 另外,也可以通过将 /etc/apache2/mods-available/rewrite.l ...
- Ubuntu系统上All-in-one部署OpenStack
虚拟机软件:VMware Workstaion12 操作系统:Ubuntu14.04 1.修改Ubuntu14.04的apt源为国内的阿里源: cp /etc/apt/sources.list /et ...
- 基于Ubuntu系统的Tomcat部署项目
第一步.拿到项目war包 第二步.上传到服务器/var/lib/tomcat8/webapps/ROOT目录下 第三步.使用命令解压war包 jar -xvf star1.0.0.war 第三步.重启 ...
- 部署完的Django项目升级为HTTPS
1.阿里云上申请免费ssl证书--->提交各种资料--->等待审核--->下载证书. 2.远程连接阿里云服务器,将下载下来的证书内容复制到Nginx安装目录下的cert目录(需要新建 ...
- apache部署django记录
在ubuntu下通过apache部署django 首先需要下载python,django,apache以及wsgi模块 python基本已经自带,我用的是2.7,不是的话可以重新装一个 下载djang ...
随机推荐
- leetcode343
public class Solution { public int IntegerBreak(int n) { ) { ; } ) { ; } var max = int.MinValue; ; i ...
- 【技术调研】最强Node-RED初探总结
在某个项目中需要调研下node-red的功能,我大概花了三天时间研究了相关的官方文档,写了几个Demo总结了下node-red相关的功能.如需转载,请注明出处 https://www.cnblogs. ...
- 201671010127 2016-2017-8 回谈static修饰符
上周学了泛型程序程序设计技术,再一次接触到了静态方法,那么今天就来谈一下static修饰符. static表示“全局”或者“静态”的意思,用来修饰成员变量和成员方法,也可以形成静态static代码块, ...
- Eclipse右击jsp没有运行选项
maven项目低级错误,没有更新maven资源库.....更新后就运行起来了
- 507. Perfect Number 因数求和
[抄题]: We define the Perfect Number is a positive integer that is equal to the sum of all its positiv ...
- 面试题:TCP协议三次握手
一.首先了解TCP报文格式 其中必须了解的字段有: 1.源端口与目的端口:16位,标识出发送端与接收端的端口号. 2.序号:32位,也叫顺序号.seg序号,本报文段所发送的数据的第一个字节的序号,用来 ...
- Oracle——控制事务
一.回滚到保留点 使用 SAVEPOINT 语句在当前事务中创建保存点. 使用 ROLLBACK TO SAVEPOINT 语句回滚到创建的保存点. 二.提交或回滚前的数据状态 改变前的数据状态是可以 ...
- Codeforces 427E Police Patrol
找中间的数,然后从两头取. #include<stdio.h> ; int pos[MAX]; int main() { int n,m,tmp; int i; int pol; long ...
- html5操作类名API——classlist
tagNode.classList.add('123'); // 添加类 tagNode.classList.remove('bbb'); // 删除类 tagNode.classList.toggl ...
- 【Web API2】ASP.NET Web API Security
实现安全的方式既可以是host提供,也可以框架提供. 1,HTTP Module 方式,工作在IIS上,所以web api要托管在IIS上才行.其作用于HTTP管道的最前端,所以这种方式影响的是全局, ...