nginx目录下配置:

ssl目录下 添加 证书和密码,如图

/etc/nginx/conf.d  下修改配置文件

HTTP域名的配置: 

## Basic reverse proxy server ##
## Apache backend for www.yuming.com ##
upstream yuming{
server 127.0.0.1:8080; #Apache
}

## Start www.yuming.cn ##
server {
listen 80;
server_name yuming.com www.yuming.com;
return 301 https://yuming.com$request_uri;
access_log logs/yuming.access.log main;
error_log logs/yuming.error.log;
root html;
index index.html index.htm index.php;

## send request back to apache ##
location / {
proxy_pass http://yuming;

#Proxy Settings
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_max_temp_file_size 0;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
}

HTTPS的配置 conf

## Basic reverse proxy server ##
## Apache backend for www.yuming.com ##
upstream zjydjf1 {
server 127.0.0.1:6443; #Apache   与 tomcat里配置的相同 端口
}

server {
listen 443;
server_name yuming.com;
ssl on;
ssl_certificate ssl/p2p.pem;
ssl_certificate_key ssl/p2p.key;

ssl_session_timeout 5m;

ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
access_log logs/yuming.access.log main;
error_log logs/yuming.error.log;
root html;
index index.html index.htm index.php;

## send request back to apache ##
location / {
proxy_pass https://zjydjf1;

#Proxy Settings
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_max_temp_file_size 0;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}

}

tomcat配置:

配置server.xml

仅供参考

nginx tomcat https配置方案的更多相关文章

  1. Window nginx+tomcat+https部署方案 支持ios9

    客户端和 Nginx 之间走的 HTTPS 通讯,而 Nginx 到 Tomcat 通过 proxy_pass 走的是普通 HTTP 连接. 下面是详细的配置(Nginx 端口 80/443,Tomc ...

  2. Nginx+Tomcat+Https 服务器负载均衡配置

    这篇过气了! 重新补一个:http://www.cnblogs.com/hackyo/p/6809773.html 由于需要,得搭建个nginx+tomcat+https的服务器,搜了搜网上的发现总是 ...

  3. (转)Nginx的https配置记录以及http强制跳转到https的方法梳理

    Nginx的https配置记录以及http强制跳转到https的方法梳理 原文:http://www.cnblogs.com/kevingrace/p/6187072.html 一.Nginx安装(略 ...

  4. nginx+tomcat安装配置

    nginx+tomcat安装配置 # nginx+tomcat安装配置 #创建网站目录 mkdir -p /www/wwwroot cd /www #安装配置 wget http://mirrors. ...

  5. Tomcat8配置Https协议,Tomcat配置Https安全访问,Tomcat Https配置

    Tomcat8配置Https协议,Tomcat配置Https安全访问,Tomcat Https配置 ============================== ©Copyright 蕃薯耀 2017 ...

  6. tomcat 安装配置部署到nginx+tomcat+https

    目录 1 Tomcat简介 2.下载并安装Tomcat服务 2.2 部署java环境 2.3 安装Tomcat 2.4 Tomcat目录介绍 (关注点 bin conf logs webapps) 2 ...

  7. Nginx+Tomcat Https SSL部署方案

    1.软件版本: nginx-1.15+ tomcat-8.0+ 2.先解决一个疑问:Tomcat到底需不需要配置SSL? 答案:不需要 3.SSL申请 使用腾讯云.阿里云的服务器,会更加方便申请.(申 ...

  8. spring-boot+nginx+tomcat+ssl配置笔记

    如果你的tomcat应用需要采用ssl来加强安全性,一种做法是把tomcat配置为支持ssl,另一种做法是用nginx反向代理tomcat,然后把nginx配置为https访问,并且nginx与tom ...

  9. windows下搭建nginx服务器及实现nginx支持https配置流程

    最近刚接触到了tomcat结合nginx做网站的负载均衡.之前对tomcat搭配nginx实现负载均衡也写过,在上一篇的博客中,最近遇到的问题是要在http的基础上支持https.也就是支持加密的请求 ...

随机推荐

  1. RS:关于数据挖掘中的推荐系统

    一.推荐系统概述和常用评价指标 1.1 推荐系统的特点 在知乎搜了一下推荐系统,果真结果比较少,显得小众一些,然后大家对推荐系统普遍的观点是: (1)重要性UI>数据>算法,就是推荐系统中 ...

  2. JBOSS整套开发组件整合和配置方法

    http://blog.csdn.net/laigood/article/details/5743712主要是集成jboss,jboss esb,jboss portal,jboss seam,jbo ...

  3. bootstrap 页面标题

    页面标题会突出显示,当一个网页中有多个标题且每个标题之间需要添加一定的间距时,页面标题显得特别有用,页面标题会给不是页面标题之间的元素加上横线 加以区分,以突出标题显示. 页面标题类 显示效果图 代码 ...

  4. Azure 服务监控API调用

    概述 在使用Azure的过程中,很多用户希望通过code的方式获取服务在管理门户中显示的监视信息,如虚拟机的CPU.服务总线的总消息出入数等.目前Azure的大部分服务都已经支持通过监控器的API查询 ...

  5. U盘装系统:安装GHOST Win7系统教程

    可以搜索:装机吧 原文地址:http://www.zhuangjiba.com/jiaocheng/show-27-247-1.html

  6. pandas所占内存释放

    df = pd.read_csv('....') 要调用循环处理多个文件时,内存占用情况严重,如果互相之间不需要调用,可以直接del df  释放内存

  7. Mysql暴错注入代码-webshell

      MySql Error Based Injection Reference[Mysql暴错注入参考]Author:Pnig0s1992Mysql5.0.91下测试通过,对于5+的绝大部分版本可以测 ...

  8. unity5, UI Button "On Button Down"

    unity5自带的UI Button的Inspector面板中只有On Click事件,如果我们想让一个按钮响应On Button Down事件该怎么办呢?方法是: 点Add Component-&g ...

  9. scut协议配置工具初始化的一些问题

    1.如果点击协议配置工具左上角的项目按钮没反应,说明数据库没有正确配置. 2.数据库创建脚本运行如果乱码,把utf-8改成ansi 3.如果ContractDB不存在就自行创建数据库. 4.使用sql ...

  10. springboot整合docker部署(两种构建Docker镜像方式)--2019-3-5转

    原文:https://www.cnblogs.com/shamo89/p/9201513.html 项目结构 package hello; import org.springframework.boo ...