博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
openssl
阅读量:4709 次
发布时间:2019-06-10

本文共 1581 字,大约阅读时间需要 5 分钟。

openssl制作2048

openssl genrsa -des3 -out server.key 2048

openssl req -new-key server.key -out server.csr

openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt

[root@localhost conf.d]# /usr/local/nginx/sbin/nginx -V 查看是否含有 --with-http_ssl_module 模块

nginx version: nginx/1.6.2

built by gcc 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)

TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module --with-http_ssl_module

配置nginx中的ssl证书

#user nobody;

worker_processes 1;

#error_log logs/error.log;

#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '

# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

#access_log logs/access.log main;

sendfile on;

#tcp_nopush on;

#keepalive_timeout 0;

keepalive_timeout 65;

#gzip on; 

include /usr/local/nginx/conf/conf.d/*.conf; #配置在  nginx配置文件的 http{}中 主要作用引入https.conf

more https.conf 

server {

listen 443;
server_name 10.1.3.47;
ssl on;
ssl_certificate keys/server.crt;
ssl_certificate_key keys/server.key;

location / {
root html;
index index.php index.html index.htm;
}
}

tomcat需要在配置文件中所做的配置为

<Valve className="org.apache.catalina.valves.RemoteIpValve"

remoteIpHeader="X-Forwarded-For"
protocolHeader="X-Forwarded-Proto"
protocolHeaderHttpsValue="https"/>

 

转载于:https://www.cnblogs.com/quemengqio/p/7010181.html

你可能感兴趣的文章
Fix git 提交代码错误
查看>>
每天五道面试题
查看>>
BZOJ-1927 星际竞速 最小费用最大流+拆点+不坑建图
查看>>
【BZOJ-2299】向量 裴蜀定理 + 最大公约数
查看>>
Android intent action大全
查看>>
WCID Devices -- Windows Compatible ID Devices
查看>>
LVS--什么是LVS?
查看>>
[BZOJ3671][UOJ#6][NOI2014]随机数生成器
查看>>
365. Water and Jug Problem
查看>>
SAP WM 有无保存WM Level历史库存的Table?
查看>>
w3wp 备忘录
查看>>
queue队列
查看>>
前缀和&&离散化
查看>>
excel
查看>>
greendroid cast problem
查看>>
学习:Android框架
查看>>
学习IOS开发UI篇--数据存储
查看>>
Python3标准库
查看>>
BAT美团滴滴java面试大纲(带答案版)之四:多线程Lock
查看>>
jdk动态代理
查看>>