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中配置,一般情况下域名管理商会提供配置 ...
随机推荐
- CEPH 使用SSD日志盘+SATA数据盘, 随OSD数目递增对性能影响的递增测试
最近建设新机房,趁项目时间空余较多,正好系统的测试一下CEPH集群性能随OSD数目的变化情况, 新ceph集群测试结果如下: 1)4k随机读在3/6/9osd host下的性能差不多,吞吐量约50~6 ...
- [前端随笔][JavaScript] 制作一个富文本编辑器
写在前面 现在网上有很多现成的富文本编辑器,比如百度家的UEditor,kindeditor,niceditor等等,功能特别的多,API也很多,要去熟悉他的规则也很麻烦,所以想自己了解一下原理,做一 ...
- A mind map of A Byte Of Python
- 基于vue2.0的后管系统(配置篇)
一些项目依赖package.json { "name": "frontend", "description": "tssp bas ...
- neo4j中索引的使用
neo4j可以对node和relationship中的属性建立索引,索引中的node(relationship)和属性对key-value为多对多的关系.一个node(relationship)可以在 ...
- python笔记六:进程与线程
1.进程 1)调用unix/linux系统中的进程函数fork(),用法和linux相同,调用成功返回0,失败返回-1: import os print 'Process (%s) start...' ...
- HDU 6201 transaction transaction transaction(树形DP)
transaction transaction transaction Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 132768/1 ...
- Linux命令之gdisk
gdisk -l [设备] gdisk又叫GPT fdisk,算是fdisk的延伸吧,主要使用的是GPT分区类型,用来划分容量大于2T的硬盘. 扩展1:分区类型GPT和MBR.GPT最大支持18EB( ...
- 简述HttpSession的作用、使用方法,可用代码说明
HttpSession中可以跟踪并储存用户信息,把值设置到属性中,有2个方法:setAttribute(),getAttrribute(): 例如:在一个方法中用session.setAttribut ...
- I/O 多路复用之select、poll、epoll详解
select,poll,epoll都是IO多路复用的机制.I/O多路复用就是通过一种机制,一个进程可以监视多个描述符,一旦某个描述符就绪(一般是读就绪或者写就绪),能够通知程序进行相应的读写操作.但s ...