首页 > 系统相关 >nginx配置

nginx配置

时间:2023-01-11 17:23:01浏览次数:41  
标签:http stream 配置 192.168 server 8848 nginx

# For more information on configuration, see
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/
# 支持stream
load_module /usr/lib64/nginx/modules/ngx_stream_module.so

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
worker_rlimit_nofile 65535;
events {
    use epoll;
    worker_connections 51200;
    multi_accept on;
}

# stream透传 stream { upstream ldap { server 22.104.1.1:389; server 22.104.1.2:389; server 22.104.1.8:389; } server { listen 8389; proxy_pass ldap; } }

# http代理
http {
  # nacos server 负载
  upstream nacos {
    # 配置三台Nacos Server的IP和端口
    server 192.168 35.32:8848;
    server 192.168 35.34:8848;
    server 192.168 35.42:8848;
  }
  server {
  listen 8848; # 可以换成其他端口
  server name 192.168.35.31; # 如果有域名可换成域名
  location / {
    proxy pass http://nacos;
  }
}

 

标签:http,stream,配置,192.168,server,8848,nginx
From: https://www.cnblogs.com/tgttttttttt/p/17044389.html

相关文章

  • Centos7最小安装之网络配置
    1.获取权限命令行先进入​​su​​​(不进的话,每次输密码很烦2.查看网卡信息输入命令 ​​ls/etc/sysconfig/network-scripts​​可以看到有线网卡名称为​​ifcfg-enp3s0......
  • SpringBoot配置文件中spring
    SpringBoot配置文件中spring.profiles.active配置详解现象:在开发的时候测试和生产配置不一样每次加配置都需要更新生产原因:不方便解决:添加多套配置知识库:1、多环......
  • nginx 如何处理https 协议访问http 协议图片的问题
    1.先在后端转换成代理路径 2.然后再配置nginx,转换成http路径,实现访问    ......
  • 【Azure 应用服务】Azure Function 部署槽交换时,一不小心把预生产槽上的配置参数交换
    问题描述部署Function代码先到预生产槽中,进行测试后通过交换方式,把预生产槽中的代码交换到生产槽上,因为在预生产槽中的设置参数值与生产槽有不同,但是在交换的时候,没有仔细......
  • python之路 58 linux文件配置相关
    网络不通排除流程1.确认⽹关地址是否通畅2.确认⽹卡配置是否正确vi/etc/sysconfig/network-scripts/ifcfg-eth03.确认⽹络管理服务关闭systemctlstopNe......
  • Nginx负载均衡(Centos7)
    需要实现的效果:centos服务器上安装nginx(监听80端口),另外安装两个tomcat,分别监听8080和8081当在浏览器中输入 http://192.168.17.129/edu/a.html 的时候,实现负载均衡,平......
  • ubuntu20.04 安装 samba 并配置 win10映射
    1、安装samba软件并配置开机自启动apt-getinstallsambasamba-commonsystemctlenablesmbd2、创建sumba主文件夹mkdir/opt/data/sambachmod-R777/opt/data/sa......
  • 1分钟了解网络交换机的6种命令配置模式
    我们在配置交换机的时候首先要了解的就是交换机命令模式,小编用Cisco思科交换机为例带大家了解交换机的6种配置模式。CiscoIOS提供了用户EXEC模式和特权EXEC模式两种基本的......
  • nginx_keepalive
    客户端配置http{includemime.types;default_typeapplication/octet-stream;#log_formatmain'$remote_addr-$remote_user[$time_local]......
  • Jupyter notebook关于端口,密码,ip的配置
    在服务器上使用jupyternotebook的时候想配制成:用所有电脑都可以使用的ip地址打开同一个后台运行的jupyter1.生成配置文件在命令行输入jupyternotebook--generate-con......