Nginx笔记总结一:基本安装和配置
1. Nginx安装
下载地址和安装依赖包
http://nginx.org/download/nginx-1.9.14.tar.gz
yum -y install pcre pcre-devel zlib-devel openssl*
编译安装
./configure --prefix=/usr/local/nginx \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-pcre
启动,关闭,重启
/usr/local/nginx/sbin/nginx 启动
/usr/local/nginx/sbin/nginx -s stop 关闭
/usr/local/nginx/sbin/nginx -s reload 重启
/usr/local/nginx/sbin/nginx -t 检查配置
配置文件
user nobody;
worker_processes ;
error_log logs/error.log notice;
pid logs/nginx.pid;
events {
worker_connections ;
use epoll;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
sendfile on;
tcp_nopush on;
keepalive_timeout ;
gzip on; upstream proxy1 {
server 192.168.89.10:;
}
upstream proxy2 {
server 192.168.89.10:;
} server {
listen ;
server_name www1.dlab.com;
location / {
proxy_pass http://proxy1;
}
} server {
listen ;
server_name www2.dlab.com;
location / {
proxy_pass http://proxy2;
}
}
}
Nginx笔记总结一:基本安装和配置的更多相关文章
- HBase学习笔记之HBase的安装和配置
HBase学习笔记之HBase的安装和配置 我是为了调研和验证hbase的bulkload功能,才安装hbase,学习hbase的.为了快速的验证bulkload功能,我安装了一个节点的hadoop集 ...
- Nginx 在 Linux 上的安装和配置
一.Nginx的安装 1.单台Nginx的安装 Nginx在Linux上的安装可以参考这篇博客:http://blog.csdn.net/molingduzun123/article/details/ ...
- nginx在linux上的安装与配置详解(一)
Nginx的安装与配置详解 (1)nginx简介 nginx概念: Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,并在一个BSD-like ...
- 【无网条件下】Linux系统、jdk、redis及集群、rabbitmq、nginx、weblogic和oracle安装及配置
本篇文章为原创,仅供参考使用,如果需要文章中提到的所有软件安装包和依赖包(即data),请以博客园邮箱联系获取链接. 准备资料 软件 主要软件包版本 路径 系统镜像 CentOS-6.10-x86_6 ...
- Git学习笔记(1)——安装,配置,创建库,文件添加到库
初次接触git,为了记忆深刻,把学习的简单流程记录下来. 本文记录了Git在Ubuntu上的安装,配置,以及创建版本库和往库中添加文件的过程. 1.Git的安装:(Ubuntu-Linux非常友好的安 ...
- nginx在CentOs下的安装及配置
前言: 先介绍一下nginx: Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,并在一个BSD-like 协议下发行.其特点是占有内存少,并发能力强, ...
- nginx 系列 1 linux下安装以及配置IIS分发
一. 安装 操作系统:centos 7 ,nginx版本1.12.2,windows server 2008 iis 1.1 确认nginx所依赖的工具 Zlib: nginx提供gzip模块,需要 ...
- nginx负载均衡fair模块安装和配置
nginx-upstream-fair-master fair模块源码 官方github下载地址:https://github.com/gnosek/nginx-upstream-fair说明:如果从 ...
- Nginx入门(一)——安装和配置
1.下载地址 http://nginx.org/en/download.html 2.启动Nginx 进入window的cmd窗口,输入如下图所示的命令,进入到nginx目录(F:/nginx-1.8 ...
随机推荐
- goweb-安装go及配置go
安装go及配置go 安装go 写这篇博客时,我的电脑的windows已经安装过了go,用的是标准包安装,不过我的linux操作系统还没安装,可以考虑用第三方工具安装,因为看了goweb这本书,我才知道 ...
- tensorflow中使用指定的GPU及GPU显存
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 本文目录 1 终端执行程序时设置使用的GPU 2 python代码中设置使用的GPU 3 设置tensorflow使用的显 ...
- CodeForces 1006E Military Problem(DFS,树的选择性遍历)
http://codeforces.com/contest/1006/problem/E 题意: 就是给出n,m,共n个点[1,n],m次询问.第二行给出n-1个数a[i],2<=i<=n ...
- SpringBoot项目启动之前操作,启动之后操作
1.在Bean对象初始化之前可以做的操作 @Component public class InitBean implements BeanDefinitionRegistryPostProcessor ...
- Educational Codeforces Round 80 (Rated for Div. 2)D E
D枚举子集 题:https://codeforces.com/contest/1288/problem/D题意:给定n个序列,每个序列m个数,求第i个和第j个序列组成b序列,b序列=max(a[i][ ...
- sqlite如何避免重复建表(获取已经存在的表)
找到已经存在的所有表,手动判断是否需要建表 SELECT name FROM SQLITE_MASTER WHERE type='table'ORDER BY name" 建表时sqlite ...
- TPO3-1Architecture
Much of the world's great architecture has been constructed of stone because of its beauty, permanen ...
- Android之布局Application类
转载:https://blog.csdn.net/pi9nc/article/details/11200969 一 Application源码描述 * Base class for maintaini ...
- MFC修改系统托盘的图标
最近开始学习MFC,发现程序在任务栏,窗口和exe都使用的默认图标,那么,我们想使用自己的图标该如何做? 第一种方法: 1.我们将自己要使用的icon的图标导入项目中. 资源视图-->xx.rc ...
- Java分层架构的使用规则
原文章引用地址:http://blog.csdn.net/ygzk123/article/details/7816511 三层结构的程序不是说把项目分成DAL, BLL, WebUI三个模块就叫三层了 ...