One. Nginx installation of SSL certificate requires
Two configuration Files
1_ROOT_BUNDLE.CRT , 2_domainname.com.key.
Note: These three certificate files are in folder for Nginx.zip, example:1_root_bundle.crt is the root certificate chain (public key), 2_ Domainname.com.key is the private key.
(Where: Certificate public key, private key file is usually named after your domain name; the certificate suffix C
The code is as follows
Copy Code
OpenSSL x509-req-days 3650-in hupohost.csr-signkey hupohost.key-out hupohost.crt
Here 3650 is the certificate validity period recommendation 3650 haha. This is random. The last file to use is key and CRT files.If you need to use a PFX you can use the following command to generate
The code is as follows
Copy Code
OpenSSL pkcs12-export-inkey hupohost.key-in hupohost.crt-out hupohost.pfx
Recently in a project, the use of enterprise, the structure of the use of Nginx +tomcat cluster, and Nginx configuration Ssl,tomcat no SSL, the project uses the HTTPS protocol, but in the debugging menu related functions found error, error information as follows:After debugging the code inside the Dofilter, found that:
By default, the SSL module is not installed. To use this module, You need to specify the-with-http_ssl_module parameter during compilation. The installation module depends on the OpenSSL library and some reference files, these files are usually not in the same software package. Generally, this file name is similar to libssl-Dev.Generate Certificate
To generate a simple certificate, follow these steps:First, go to the directory where you want to create
The SSL module is not installed by default, and if you want to use the module, you will need to specify the –with-http_ssl_module parameter at compile time, and the installation module relies on the OpenSSL library and some reference files, usually not in the same package. Usually this file name is similar to Libssl-dev.Generate certificateYou can generate a simple certificate by using the following steps:First, go to the directory where you want to c
server {Listen 443;server_name hsggj.docker.com;The address you define yourself;SSL on;SSL_CERTIFICATE/ETC/NGINX/SSL/NGINX.CRT;The location of the CRT; ssl_certificate_key/etc/nginx/ssl/nginx.key; where key is located;}If the certificate will not be demonstrated, my blog has
1. Installing OpenSSLsudo apt-get install OpenSSLsudo apt-get install Libssl-dev2. Place the corresponding certification file Domain.crt,domain.key under/etc/nginx/sslAdd the following to the corresponding virtual host configuration file in Site-avaliableserver {Listen 443;server_name domain.com;root/var/www/project folder;Index index.php index.html index.htm;SSL on;SSL_CERTIFICATE/ETC/
https://mozilla.github.io/server-side-tls/ssl-config-generator/
Https://github.com/mozilla/server-side-tls
Different enhanced SSL config is generated based on different server versions. See Configuration is disabled SSLv3, enabled enhanced encryption algorithm and added HSTS feature support.
Mozilla's Server Side TLS guidelines has a detailed description of the configuration.
The following is an example of
Default: When the SSL protocol is used for handshake negotiation, the default is not to send the host name, that is, in the form of IP for HTTPS connection handshake negotiation, which leads to a problem, when there are multiple virtual hosts on a server using the same IP,Nginx will be an error in the Counter-generation!SNI (server Name Indication): is to solve a server, the same IP, the use of multiple dom
Share how I step-by-step to configure SSL on Nginx.First, make sure that the OpenSSL library is installed and that the –with-http_ssl_module parameter is used when installing Nginx.Beginner or rookie recommends using LNMP for one-click installation.To generate a certificate:Enter the directory where you want to generate the certificateCd/usr/local/nginx/confCreate a server private key using OpenSSL and ente
Nginx + SSL Optimized configuration:1 #http段添加如下配置项:2 3 http {4 5 ssl_prefer_server_ciphers on; #设置协商加密算法时, priority is given to the encryption suite on our service side, not the client browser's encryption suite. 6Ssl_protocols TLSv1 TLSv1.1TLSv1.2; #协议安全设置7Ssl_ciphers all:!kedh! adh:rc4+rsa:+high:+medium:+low:+sslv2:+EXP; #加密套件 Ssl_ciphers Select the encryption suite, the packages (and the order)
Generate private keys (key) and certificate request files (CSR)
Open the terminal and enter the following command
OpenSSL req-new-newkey rsa:2048-nodes-keyout domain.key-out DOMAIN.CSR
The build process asks several common questions, such as city, country, and so on.
Finally will ask challenge password, the input time remembers is OK.
After the above command is executed, the current directory will have "Domain.key" and "DOMAIN.CSR" files
Goddy Certificate
After the purchase of
Because the company project has to use the link to HTTPS, to get a certificate, after configuration, HTTPS can be normal access, but the previous HTTP is a 400 error, nginx configuration is as follows:
The code is as follows
Copy Code
server {Listen default backlog=2048;Listen 443;server_name 111cn.net;root/var/www/html;SSL on;SSL_CERTIFICATE/USR/LOCAL/TENGINE/SSLCRT/111CN.NET.CR
Nginx + Apache + SSL + SVN svn copy 502 Bad Gateway
When Nginx is used to access the SVN server through https, the following error occurs when svn copy is executed:Svn: Server sent unexpected return value (502 Bad Gateway) in response to COPY request
Solution:Location /{Proxy_redirect off;Proxy_set_header Host $ host;Proxy_set_header X-Forwarded-Host $ host;Proxy
Create a server private keyOpenSSL genrsa-des3-out Server.key 1024Create a certificate for the signing request (CSR)OpenSSL Req-new-key server.key-out SERVER.CSRload SSL-supported Nginx and remove the required password when using the above private key:CP Server.key server.key.org OpenSSL rsa-in server.key.org-out server.keyThe last token certificate uses the above private key and the CSROpenSSL x509-req-day
Nginx support for multiple domain name SSL certificate is required OpenSSL library support, centos5.x OpenSSL library itself does not support this feature, the need to download the compilation, the following steps
wget https://www.openssl.org/source/old/0.9.x/openssl-0.9.8zh.tar.gzTar zxvf./openssl-0.9.8zh.tar.gzCD./openssl-0.9.8zh./config Enable-tlsextMakeMake installNginx also want to recompile, add th
./configure:error:the HTTP Cache module requires MD5 functionsFrom OpenSSL Library. Can either disable the module by using--without-http-cache option, or install the OpenSSL library into the system,or builds the OpenSSL library statically from the source with Nginx by using--with-http_ssl_module--with-openssl=
This prompt occurs because SSL specifies a path error problem, OpenSSL decompression settings to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.