centos7 nginx配置httpsCenos(6.6/7.1)下从源码安装Python+Django+uwsgi+nginx环境部署(二)
|
1.yum安装nginx
2.安装uwsgiyum install python-devel pip install uwsgi 3.nginx 配置https一、生成私钥和证书 创建带密钥口令的私钥 Please enter the following 'extra' attributes 额外信息 1,创建私钥(去除密钥口令) 2,创建CA证书 将生成的证书放到/etc/nginx/conf.d/目录下, root@mysqlmaster:/tmp# cp server.crt server.key /etc/nginx/conf.d 三、修改nginx配置文件 vi /etc/nginx/nginx/conf.d/default.conf #let http to https 注意以上为nginx的配置文件,分为三部分,每一个server函数为一个部分,第一部分为http的配置,第二部分为https的部分,第三个部分是将http重写到https,也就是所有的走80端口的都强制他都443端口去。 sed -i "/listen 80;/{n;s/.*/ server_name 172.17.1.129;/g}" /etc/nginx/conf.d/default.conf
重写匹配 重启nginx 即可访问。 uwsgi --socket 127.0.0.1:9000 --chdir /xspeeder/xweb/ --wsgi-file xweb/wsgi.py --master --processes 2 --threads 2 |
centos7 nginx配置httpsCenos(6.6/7.1)下从源码安装Python+Django+uwsgi+nginx环境部署(二)的更多相关文章
- Cenos(6.6/7.1)下从源码安装Python+Django+uwsgi+nginx到写nginx的环境部署(一)
梳理下这几个的关系: centos是redhat的社区版操作系统. Python2.7.5是开发语言(centos6.5下自带的python是2.6.6版本,所以需要源码更新,而centos7.1下面 ...
- python django uwsgi nginx安装
python django uwsgi nginx安装 已安装完成python/django的情况下安装 pip install uwsgi cd /usr/share/nginx/html/ vim ...
- 源码安装python +NGINX 的坎坷路 +uwsgi安装 部署django 的CRM项目
一.Nginx安装(基于ubuntu17.10 版本) 首先我们是基于源码安装,主要有如下步骤 1.安装依赖包 1.安装gcc g++的依赖库 sudo apt-get install build-e ...
- Python+django+uWSGI+Nginx
Python3.5+Django+uWSGI 安装Django pip3.5 install django 安装 uWSGI pip install uwsgi 新建 django_wsgi.py # ...
- CentOS7.3环境下源码安装httpd
CentOS7.3环境下源码安装httpd 本文在CentOS7.3下,源码安装apache服务httpd2.4. 1.下载好源码安装包 [root@localhost ~]#ll total 625 ...
- nginx源码安装教程(CentOS)
1.说明 官方源码安装说明:http://nginx.org/en/docs/configure.html 源码包下载地址:http://nginx.org/en/download.html 版本说明 ...
- 源码安装nginx 方法二
yum 仓库不能用大写字母 [root@oldboy conf.d]# gzip * 压缩当前目录下的所有文件 gzip ./* gzip . gzip./ # 关闭防火墙和selinux [root ...
- nginx在Centos7.5下源码安装和配置
安装nginx 安装nginx依赖包 yum install -y pcre-devel zlib-devel openssl-devel wget gcc tree vim 进入目录/root/se ...
- centos7 中源码安装nginx
使用nginx有一段时间了,还是有很多东西不懂的,在这里做一下自己学习过程中的一些整理,能使自己得到提升. 1.环境:centos7 1511 最小化安装 2.下载nginx,可以在系统中下载,也可 ...
随机推荐
- chineseChess
最近学习了chineseChess的Qt实现,把一些东西总结一下: 实现功能: 1.人人对战 2.人机对战 3.网络版 一.基础性工作:(人人对战) 1.棋盘和棋子的绘制(QPinter,drawLi ...
- Linux vi编辑器的基本命令
vi编辑器的文字说明 模式:命令模式,编辑模式,末行模式. 切换方式:命令模式→i→编辑模式,编辑模式→Esc→命令模式,命令模式→:→末行模式. 功能: 命令模式(Command Mode): 控制 ...
- IOS第八天(6:UITableViewController新浪微博, 模型和 控件位置封装一起statusFrame)
*****HMViewController #import "HMViewController.h" #import "HMStatus.h" #import ...
- 【7集iCore3基础视频】7-3 iCore3硬件介绍
iCore3原理图介绍: 高清源视频:http://pan.baidu.com/s/1gfbhuE3%20密码:xnbc iCore3 购买链接:https://item.taobao.com/ite ...
- ajax+ashx
eg: $('.setIsEnableClosed').click(function(){ var id=$(id).attr("name"); var isChecked=$(t ...
- 【转】ArcGIS 创建切片缓存方法工具总结
ArcGIS 创建切片缓存方法工具总结 http://wenku.baidu.com/link?url=Bm8AkmcJBzfiyat9N_Me6vlfSHEDCC_D1qBk5IB4X4CIDeKI ...
- Maven-010-maven 编译报错:Failure to ... in ... was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced.
今晚在编译 maven 项目的时候,命令行报错,出现 Failure to ... in ... 类似错误,详细的错误信息如下所示: [INFO] -------------------------- ...
- js 除法 取整
js 除法 取整 1.丢弃小数部分,保留整数部分 js:parseInt(7/2) 2.向上取整,有小数就整数部分加1 js: Math.ceil(7/2) 3,四舍五入. js: Math.roun ...
- jQuery判断对象是否是函数
var show=function () { // body... } if($.isFunction(show)){ //是函数 }else{ //不是函数 }
- HTML form enctype 属性试验
HTML form enctype http://www.w3.org/TR/html401/interact/forms.html#h-17.13.1%E2%80%8D enctype= conte ...