Nginx学习之二
来源:互联网 发布:章子怡演技知乎 编辑:程序博客网 时间:2024/05/16 11:30
#user nobody;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
#负载均衡服务器列表
upstream localhost{
#服务器地址及相应权重 假设本地部署了两个相同项目 端口分别为80和81
server 127.0.0.1:80 weight=1;
server 127.0.0.1:81weight=3;
}
#代理服务器设置
server {
#监听端口
listen 801;
#虚拟主机名称,单域时默认即可
server_name localhost;
#代理设置
location / {
#代理地址
proxy_pass http://localhost;
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
0 0
- Nginx学习之二
- Nginx学习成长之路(二)
- nginx学习之旅(二)nginx 配置初探
- Nginx入门之二
- Nginx初探之二
- Nginx学习之二-配置项解析及编程实现
- Nginx学习之二-配置项解析及编程实现
- Nginx学习之二-配置项解析及编程实现
- Nginx学习笔记二 -- nginx的配置
- Nginx之(二)Nginx安装
- Nginx(二)之Nginx 的安装
- nginx 源码学习笔记(二)
- Nginx学习笔记(二):配置文件
- nginx 学习笔记(二) --- 调试
- nginx学习-负载均衡二
- nginx源码学习(二)
- Nginx学习笔记(二)
- Nginx配置文件解析之二
- HDU 3448 Bag Problem
- python学习错误记录——创建类中初始化函数注意点
- 【数据结构】单链表的实现与基本操作C++
- bzoj4806 炮
- MySql的时间问题
- Nginx学习之二
- Java Executor简介
- log4j日志文件搬运-py工具
- atom的插件必备
- tomcat启动报错
- 欢迎使用CSDN-markdown编辑器
- PAT(乙) 1008. 数组元素循环右移问题 (20)
- UISearchController实现搜索
- Ant的学习(一)