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中配置,一般情况下域名管理商会提供配置 ...
随机推荐
- Kaggle:Titanic: Machine Learning from Disaster
一直想着抓取股票的变化,偶然的机会在看股票数据抓取的博客看到了kaggle,然后看了看里面的题,感觉挺新颖的,就试了试. 题目如图:给了一个train.csv,现在预测test.csv里面的Passa ...
- Bootstrap – 1.认识
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8&quo ...
- scala windows 安装
下载 https://downloads.lightbend.com/scala/2.11.11/scala-2.11.11.msi 第一步:设置 右击我的电脑,单击"属性",进入 ...
- win10自动更新失败
十一过后,win10 总是提示自动更新失败,每天都会重启一次,按照官方给出的操作进行了也不好使, 后来就关闭更新,没有再打开 ------------------------------------- ...
- Web APi入门之Self-Host(二)
这篇来讲讲WebApi的自托管,WebApi可以托管到控制台/winform/服务上,并不是一定要依赖IIS才行. 1.首先新建控制台项目,在通过Nuget搜索Microsoft.AspNet.Web ...
- 易普优APS应用案例:线束行业生产计划排产
一.线束行业生产现状 (1)产品种类以及标准繁多,生产计划难协调 线束行业的生产,虽然原材料不多,但线束产品却多达几万种.一般线束企业,虽然不是每个月都生产数万种产品,但每月生产的产品品种在300种以 ...
- controller中,Failed to Initialize. Reason: TimeOut虚拟用花初始化超时
1.调整 Run-timesetting->Internet Protocol->references->Advaanced->Options 将HTTP-request co ...
- lr_start_timer,lr_get_transaction_duration,lr_get_transaction_wasted_time函数使用总结
lr_start_timer: 函数的功能: 为了计算时间更加精确,可以用这个函数去掉LR自身的检查点所浪费的时间.如text check and image time Action() { doub ...
- 定期删除30天以前的elasticsearch的日志
脚本/scripts/delete-elk.log #!/bin/bash DATE=`date -d "1 days ago" +%Y.%m.%d` ip=`ifconfig e ...
- 接口自动化多层嵌套的json数据处理
最近在做接口自动化测试,响应的内容大多数是多层嵌套的json数据,在对响应数据进行校验的时候,可以通过(key1.key2.key3)形式获取嵌套字典值的方法获取响应值,再和预期值比较 def get ...