Nginx 설정 Https 상세 설명
Nginx*2+Keepalived+Tomcat*2 Web
:https://blog.51cto.com/gdutcxh/2109841
실험 환경 에서 배치
1、 openssl:yum install openssl* -y
2、 openssl
mkdir -p /etc/nginx/ssl
openssl req -x509 -nodes -days 36500 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.pem
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:New York
Locality Name (eg, city) []:New York City
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Bouncy Castles, Inc.
Organizational Unit Name (eg, section) []:Ministry of Water Slides
Common Name (e.g. server FQDN or YOUR name) []:your_domain.com
Email Address []:admin@your_domain.com
3、Nginx ( Https)
server {
listen 80;
server_name www.yourdomain.com;
rewrite ^ https://$http_host$request_uri? permanent; # force redirect http to https
#return 301 https://$http_host$request_uri;
}
server {
listen 443 ssl;
ssl_certificate /etc/nginx/ssl/nginx.pem;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
keepalive_timeout 70;
server_name www.yourdomain.com;
# header , *** ***
server_tokens off;
# HTTPS HTTP , HSTS , HTTPS
#add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
# ......
fastcgi_param HTTPS on;
fastcgi_param HTTP_SCHEME https;
access_log /var/log/nginx/wiki.xby1993.net.access.log;
error_log /var/log/nginx/wiki.xby1993.net.error.log;
}
4、 Http Https
Nginx
server {
listen 80;
listen 443 ssl;
server_name www.example.com;
ssl_certificate www.example.com.pem;
ssl_certificate_key www.example.com.key;
...
}
6、 Nginx
openssl 의 설명
req: -x509 X.509 (certificate signing request (CSR))."X.509" that SSL and TLS adheres to for its key and certificate management.
-nodes: OpenSSL .( Nginx , )。
-days 36500: ,100
-newkey rsa:2048: SSL key( RSA 2048)
-keyout:SSL
-out:
。 common name , wiki.xby1993.net , *.xby1993.net 。
기업 웹 서버 의 HTTPS
、 , CA
, , 。
、
zip , xxx.key xxx.pem 。
、 Nginx( )
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
linux2에 nginx 설치설치 가능한 nginx를 확인하고, 해당 nginx를 설치한다. localhost 혹은 해당 ip로 접속을 하면 nginx 화면을 볼 수 있다....
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.