frp, https, http, nginx 多服务, ssl等配置
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a .
try_files $uri $uri/ =;
}
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:
#
#location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php7.-cgi alone:
# fastcgi_pass 127.0.0.1:;
# # With php7.-fpm:
# fastcgi_pass unix:/run/php/php7.-fpm.sock;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# Virtual Host configuration for example.com
#
upstream movie_pool{
server 127.0.0.1:;
}
upstream go_pool{
server 127.0.0.1:;
}
#Demo1端口转发
server {
# listen ;
listen ssl;
server_name www.sddeznsm.com;
ssl on;
ssl_certificate /root/nginx-1.11./ssl/sddeznsm_com.crt;
ssl_certificate_key /root/nginx-1.11./ssl/sddeznsm_com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
access_log logs/book.log;
error_log logs/book.error;
#将所有请求转发给demo_pool池的应用处理
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://movie_pool;
}
}
#Demo1端口转发
server {
listen ;
#listen ssl;
server_name *.sddeznsm.com;
access_log logs/book.log;
error_log logs/book.error;
#将所有请求转发给demo_pool池的应用处理
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://movie_pool;
}
}
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
server {
listen ssl;
server_name sddeznsm.com;
ssl on;
ssl_certificate /root/nginx-1.11./ssl/sddeznsm_com.crt;
ssl_certificate_key /root/nginx-1.11./ssl/sddeznsm_com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://go_pool;
}
}
frp, https, http, nginx 多服务, ssl等配置的更多相关文章
- Nginx自建SSL证书部署HTTPS网站
一.创建SSL相关证书 1.安装Nginx(这里为了测试使用yum安装,实际看具体情况) [root@localhost ~]# yum install nginx -y #默认yum安装已经支持SS ...
- Httpd服务入门知识-https(http over ssl)安全配置
Httpd服务入门知识-https(http over ssl)安全配置 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.SSL会话的简化过程 ()客户端发送可供选择的加密方式, ...
- CentOS6.5 下在Nginx中添加SSL证书以支持HTTPS协议访问
参考文献: 1. NginxV1.8.0安装与配置 2. CentOS下在Nginx中添加SSL证书以支持HTTPS协议访问 3. nginx配置ssl证书的方法 4.nginx强制使用https访问 ...
- nginx上通过ssl证书将http转发为https
环境:阿里云linux,ngnix 1.16.0 ,ssl证书,XXXX.jar 0.自行在阿里云上下载免费的ssl证书.里面有2个文件.key和pem后面要用到. 1.首先将项目在linux上跑起来 ...
- [转帖]一个ip对应多个域名多个ssl证书配置-Nginx实现多域名证书HTTPS
一个ip对应多个域名多个ssl证书配置-Nginx实现多域名证书HTTPS https://home.cnblogs.com/u/beyang/ 一台服务器,两个域名 首先购买https,获取到CA证 ...
- Nginx https免费SSL证书配置指南
生成证书 $ cd /usr/local/nginx/conf $ openssl genrsa -des3 -out server.key 1024 $ openssl req -new -key ...
- 【倒腾HTTPS】Nginx for Docker自签名SSL证书
前言 合格的web程序员, 必须能自由在 IIS. Nginx. Nginx for Docker上配置Https服务, 博客最近将专题记录 Https & Hsts 如何申请适用于生产 ...
- 安卓访问https错误,访问http可以,可能是nginx ssl证书配置有问题
开发中遇到react-native生成的android访问UAT和开发环境的http api都可以,但是访问生产环境的https就报错,还有就是第三方webhook调用你https网站的api也可能会 ...
- Nginx使用SSL模块配置https
背景 开发微信小程序,需要https域名,因此使用Nginx的SSL模块配置https 步骤 一.去域名管理商(如腾讯云.阿里云等)申请CA证书 二.在Nginx中配置,一般情况下域名管理商会提供配置 ...
随机推荐
- JavaScript 兼容性总结
请实现鼠标点击任意标签,alert该标签的名称(注意兼容性) function elementName(evt){ evt = evt|| window.event; var selected = ...
- powerdeginer 默认name 为 common
在使用PowerDesigner对数据库进行概念模型和物理模型设计时,一般在NAME或Comment中写中文,在Code中写英文.Name用来显 示,Code在代码中使用,但Comment中的文字会保 ...
- Linux的shell终端常用快捷键
参考: http://www.360doc.com/content/17/0627/09/44797135_666854802.shtml https://linux.cn/article-5660- ...
- docker部署Asp.net core应用
1 容器概念 使用Docker前我们首先要简单了解一下容器的概念.MSDN上有一张虚拟机和容器的对比图,很好的展示了虚拟机和容器的区别,如下所示,虚拟机包括应用程序.必需的库或二进制文件以及完整的来宾 ...
- bzoj 1877 最小费用流
思路:挺裸的费用流,拆拆点就好啦. #include<bits/stdc++.h> #define LL long long #define fi first #define se sec ...
- c#多线程实现函数同步运行
我们假设有方法run1()和run2(),耗时都比较大,实现他们同步运行将大大提高程序的效率,在这里考虑使用多线程的方法. 首先添加引用,定义bool型i,j为false. using System. ...
- 烈焰遮天 cocos 手游mmo 源码 解析
引擎: cocos2.x 代码: c++ 混合 lua 游戏类型: mmo 工程结构: game : 游戏启动地方 gamelogic:接sdk相关,登陆支付统计等 libFramework:主要本游 ...
- Hibernate (开源对象关系映射框架)
一.基本介绍1.它对JDBC进行了非常轻量级的对象封装,它将POJO与数据库表建立映射关系,是一个全自动的orm(对象关系映射)框架,hibernate可以自动生成SQL语句,自动执行: Hibern ...
- Java常用工具类之自定义访问对象
package com.wazn.learn.util; import javax.servlet.http.HttpServletRequest; /** * 自定义访问对象工具类 * * 获取对象 ...
- HDU 6215 Brute Force Sorting(模拟链表 思维)
Brute Force Sorting Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Othe ...