首页 > 系统相关 >nginx配置

nginx配置

时间:2023-03-14 20:46:50浏览次数:39  
标签:配置 ssl cn86trading server nginx com nps listen

 这里配置的是,转发到NPS服务器

http {

    server {
        listen       80;
        listen       [::]:80;
        server_name  www.cn86trading.com cn86trading.com shoes.cn86trading.com cnapi.cn86trading.com cnpay.cn86trading.com;
#        server_name  *.cn86trading.com;
    return 301 https://$host$request_uri;
    #rewrite ^(.*)$ https://${server_name}$1 permanent;
    }

    server {
        listen       443 ssl http2;
        listen       [::]:443 ssl http2;
        server_name  cn86trading.com;

        ssl_certificate /etc/nps/nps_cert/cn86trading.com_bundle.crt;
        ssl_certificate_key /etc/nps/nps_cert/cn86trading.com.key;


#        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout  5m;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        location / {
            proxy_set_header Host $http_host;
            #proxy_set_header Host $host;
            proxy_pass http://127.0.0.1:8777;
        }
     }
   

   server {
        listen       443 ssl http2;
        listen       [::]:443 ssl http2;
        server_name  shoes.cn86trading.com;

        ssl_certificate /etc/nps/nps_cert/shoes.cn86trading.com_bundle.crt;
        ssl_certificate_key /etc/nps/nps_cert/shoes.cn86trading.com.key;
        ssl_session_timeout  5m;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        location / {
                proxy_set_header Host $http_host;
                proxy_pass http://127.0.0.1:8777;
        }
     }


   server {
        listen       443 ssl http2;
        listen       [::]:443 ssl http2;
        server_name  cnapi.cn86trading.com;

        ssl_certificate /etc/nps/nps_cert/cnapi.cn86trading.com_bundle.crt;
        ssl_certificate_key /etc/nps/nps_cert/cnapi.cn86trading.com.key;
        ssl_session_timeout  5m;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        location / {
                proxy_set_header Host $http_host;
                proxy_pass http://127.0.0.1:8777;
        }
     }

   server {
        listen       443 ssl http2;
        listen       [::]:443 ssl http2;
        server_name  cnpay.cn86trading.com;

        ssl_certificate /etc/nps/nps_cert/cnpay.cn86trading.com_bundle.crt;
        ssl_certificate_key /etc/nps/nps_cert/cnpay.cn86trading.com.key;
        ssl_session_timeout  5m;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        location / {
                proxy_set_header Host $http_host;
                proxy_pass http://127.0.0.1:8777;
        }
     }

}

 

标签:配置,ssl,cn86trading,server,nginx,com,nps,listen
From: https://www.cnblogs.com/wangfx/p/17216265.html

相关文章

  • wsl+php开发环境配置
    记录下安装过程,方便后续安装一、安装wsl参考:https://zhuanlan.zhihu.com/p/466001838   1、尽管理员身份运行powershell,运行下面四条命令wsl--installdism.e......
  • 基于Spring Boot的应用环境感知自识别配置(转)
    1.SpringBoot应用集成etcd配置源在分布式、云化的系统里,应用的配置(尤其是依赖服务的配置、环境相关的配置)都存储到应用到本地配置文件里会给维护带来很大的麻烦,而且dock......
  • YonBuilder移动开发-移动原生插件开发环境配置教程
    YonBuilder移动开发可以实现一套代码,多端生成,快速构建企业级移动应用。移动插件市场中有许多功能插件,可添加到应用中使用,提高开发效率。如果插件市场中没有满足需求的插件,......
  • Mysql配置
    1.官网下载压缩包https://downloads.mysql.com/archives/community/ 2.新建.ini文件内容[mysqld]default-time-zone='+8:00'port=3306#允许最大连接数max_conne......
  • 设置npm全局安装及缓存路径以及node.js环境配置
    安装目录下新建如下2个目录node_cache【缓存日志目录】node_module【默认安装目录】npmconfigsetprefix"D:\NodeJs\node_global"npmconfigsetcache"D:\No......
  • 配置nginx虚拟主机
    挂载系统光盘将系统光盘挂载到mnt目录删除系统自带源配置文件yum源安装nginx依赖程序卸载系统盘切换到云计算光盘挂载nginx源代码程序解压源代码程序配置nginx服务器端编译......
  • 12、MySQL数据库配置
    MySQL系统数据库MySQL系统数据库主要包括以下几个:mysql数据库:用于存储MySQL的权限信息和系统变量等,包括user表、db表、host表等,这些表是管理MySQL权限的重要基础......
  • nginx中proxy_pass各种用法详解
    代理转发规则nginx中配置location代理转发规则的时候不同写法对应不同转发规则。如果proxy_pass使用了URI,当传送请求到后端服务器时,规范化以后的请求路径与配置中的路径......
  • 保证DDS通信 ------ 配置主机和虚拟机在同一网段下
    参考博客:https://www.cnblogs.com/mrlayfolk/p/16155702.html1.设备情况主机:win10,有线连接PPPOE,校园网虚拟机:VM--centos72.主机配置打开控制面板→网络→网......
  • vscode-vim键盘操作配置
    vscode(win)+vim键盘操作配置参考了知乎博主云崖君的vscode+vim全键盘操作高效搭配方案,仅用以记录个人使用配置,内容较为简略。配置文件如下详见后续说明。s......