nginx进行反向代理,80端口使用
环境说明:centos7
安装版本:tengine2.2.2
实现目的:
想用本地80端口,代理其它服务器的非80端口,实现80端口复用
[root@tiaobanji conf]# cat nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name wiki.com;
location / {
proxy_pass http://172.16.188.207:8090;
}
}
}
server下的结点:
listen:监听80端口
server_name:转发到哪个地址
proxy_pass:代理到哪个地址
nginx常用命令(要进入到nginx的目录):
开启:start nginx
重启:nginx -s reload
nginx进行反向代理,80端口使用的更多相关文章
- nginx windows 代理 80端口 500
今天准备配置一个nginx 用来代理80端口分别访问.net core 和spring boot 服务器 配置使用的最基本的代理配置 #user nobody; worker_processes 1; ...
- nginx在使用非80端口做反向代理【转】
设置nginx反向代理,nginx在使用非80端口做反向代理时,浏览器访问发现返回302错误 upstream jboss{ server max_fails= fail_timeout=20s; s ...
- 把www.domain.com均衡到本机不同的端口 反向代理 隐藏端口 Nginx做非80端口转发 搭建nginx反向代理用做内网域名转发 location 规则
负载均衡-Nginx中文文档 http://www.nginx.cn/doc/example/loadbanlance.html 负载均衡 一个简单的负载均衡的示例,把www.domain.com均衡 ...
- Centos配置nginx反向代理8090端口到80端口
下面,我就来说说怎么反向代理自己的项目到默认80端口. 1)安装nginx:yum install nginx -y 2)启动nginx:service nginx start或者systemctl ...
- 端口被占用通过域名的处理 把www.domain.com均衡到本机不同的端口 反向代理 隐藏端口 Nginx做非80端口转发 搭建nginx反向代理用做内网域名转发 location 规则
负载均衡-Nginx中文文档 http://www.nginx.cn/doc/example/loadbanlance.html 负载均衡 一个简单的负载均衡的示例,把www.domain.com均衡 ...
- Nginx反向代理关于端口的问题
Nginx反向代理关于端口的问题 http://www.cnblogs.com/likehua/p/4056625.html Nginx默认反向后的端口为80,因此存在被代理后的端口为80的问 ...
- nginx反向代理隐藏端口号和项目名
可利用nginx反向代理隐藏端口号和项目名,直接输入ip即可访问对应的tomcat项目,配置nginx安装目录的nginx/conf/nginx.conf文件,修改如下:(开了两个web项目:项目名为 ...
- 在ubuntu上面配置nginx实现反向代理和负载均衡
上一篇文章(http://www.cnblogs.com/chenxizhang/p/4684260.html),我做了一个实验,就是利用Visual Studio,基于Nancy框架,开发了一个自托 ...
- Nginx 笔记与总结(15)nginx 实现反向代理 ( nginx + apache 动静分离)
在 nginx 中,proxy 用来实现反向代理,upstream 用来实现负载均衡. 例如有两台服务器,nginx 服务器作为代理服务器,执行 .html 文件,apache 服务器上执行 .php ...
- Nginx的反向代理
先通过简单的图来说明一下正向代理和反向代理吧~ 正向代理 代理其实就是一个中介,A和B本来可以直连,中间插入一个C,C就是中介.刚开始的时候,代理多数是帮助内网client访问外网server用的(比 ...
随机推荐
- xhr post请求
1. post提交的时候要设置post请求头,可以使用setRequestHeader(单独指定请求的某个http头) 2.通常在web开发中,使用表单提交数据的时候,一般是使用xml的格式进行的.可 ...
- linux 下 ifcfg-ethx配置和解析
网络接口配置文件[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0# Intel Corporation 82545EM ...
- react-conponent-secondesElapsed
<!DOCTYPE html> <html> <head> <script src="../../build/react.js">& ...
- 正则去除html字符串中的注释、标签、属性
var str = '<!-- 注释1 --><h1 style="color:#00ff00;text-align: center;">ProsperLe ...
- 快速上手ABP - Angular部分 - 如何最快速度了解相关API。
不是google,不是angular官网,而是在Visual Studio Code选中这个API对象,鼠标右键,选"Go to Definition" 例子:要想了解FormGr ...
- onmouseover和onmouseenter区别
onmouseover和onmouseenter都是鼠标进入时触发,onmouseover在所选元素的子元素间切换的时候也触发! <!doctype html><html lang= ...
- Javascript数组系列四之数组的转换与排序Sort方法
今天我们继续来介绍 Javascirpt 数组中的方法,也是数组系列的第四篇文章,因为数组的方法众多,每篇文章我们都对数组的每个方法都有比较细致的描述,只要你能够从中成长一点点,那我们的目的就达到了, ...
- linux 下svn操作
* 前言: linux下的svn相比于gitlab,配置要求第一点:gitlab需要4G的内存,如果使用swap+内存的替代方案,理论上是可行的,但是实际操作中各种坑: 所以,由于条件限制,使 ...
- 使用Visual Studio Team Services敏捷规划和项目组合管理(一)——使用团队、区域和迭代
使用Visual Studio Team Services敏捷规划和项目组合管理(一)--使用团队.区域和迭代 概述 在本实验,你将会了解Visual Studio Team Services提供的敏 ...
- java任意n以内连续的和等于n
import java.util.Scanner; /** * Created by Admin on 2017/3/25. */ public class test01 { public stati ...