See comments in the configuration file ~#user nobody;worker_processes 1; #pid logs/nginx.pid;events { worker_connections 1024;} HTTP { include mime.types; Default_type Application/octet-stream; Server_tokens off; Sendfile on ; Keepalive_timeout ; gzip on ; Upstream API { server 127.0.0.1:9178; } server { listen 8080; #监听8080端口 server_name localhost; #相当于IIS中的主机头 error_log logs/ Bookms.error.log; C
Because of business needs, you need to migrate an HTTPS site under the original IIS to the Nginx front-end reverse proxy architecture.The specific steps are:
Export the certificate on the Windows server where IIS resides.1) "Start"---> "Run"---> MMC2) "Add"---> "certificates"---> Add3) Select "Computer Account"--->next4) Select "Local Computer"--->ok5) "Close
; ssl_certificate /etc/nginx/ssl/www.test.com.crt; ssl_certificate_key /etc/nginx/ssl/www.test.com.key;}If all goes well, open the browser and you can access the website via HTTPS. A warning appears on the first visit (because our self-signed certificate is not trusted by the browser), the certificate is imported into the system via the browser (Windows
Earlier this year Baidu search has been fully implemented HTTPS mode, and claimed to have been able to crawl HTTPS Web page, compared to Google has already supported the capture of HTTPS in the early years, although Baidu is a bit late, but now still has, but also some people discuss about HTTPS mode baidu Google seo i
. There are two ways to do this:
The first type (Nginx and Tomcat use their respective CSR files):
1. Generate the Tomcat JKS on the server and generate the CSR through JKS. Reference: https://www.trustasia.com/help/tomcat6x-generate-csr.htm
Special attention is paid to the use of aliases and passwords to keep in mind. Because you need to be consistent when you follow the certificate.
2. Generate
Configure https access for nginx and nginxhttps access
I. Preparation
Environment: centos6.8
Nginx: 1.13.6
Ii. Start
First install the dependency package:
Yum install-y gcc-c ++ autoconf automake make zlib-devel openssl-devel pcre-devel
Start Installation
Tar-xf nginx-1.13.6.tar.gz
Cd
The source of the matter is, the company to the website from HTTP to HTTPS, due to historical reasons, only found that the existing nginx is installed through the source code, and does not install the SSL module, need to install the SLL module, this nginx is the company's most front-end agent, involving many departments, Because it has not been done before, it is
Abstract 1. Describes the iOS platform for Secure communication with the afnetworking and HTTPS backend interface. 2. Introduce the background self-signed certificate making steps. 3. And the Linux platform Nginx configuration HTTPS protocol interface of the Web site.IOS afnetworking HTTPS Openssl NginxThe problem with
Nginx Configuration HTTPSLoad BalancingNginx HTTPS protocol requires the support of the SSL module, we use the--with-http_ssl_module parameter to add the SSL module when compiling nginx. Also need the server private key, the server certificate, if is the company external environment, this certificate needs to purchase the third party's authoritative certificate,
security
Nginx config on Gits
Top Nginx WebServer Best Security practices
SSL Server Test--Security Test tool
Force the use of https#server { listen 80; listen 443 ssl; server_name example.com; if ($scheme = http) { return 301 https://$server_name$request_uri; } ....} Remov
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 when you compile Nginx.Demand:Doing a website domain name for www.localhost.cn requires access through https://www.localhost.cn.10.10.100.8 www.localhost.cnExperimental steps:1. First ensure that OpenSSL and Openssl-devel are installed on the machine#yum Install Openssl#yum Install Openssl-devel2. Create a server
The deployment of HTTPS on Nginx relies on the OpenSSL library and the include files, that is, the Libssl-dev must be installed first, and Ln-s/usr/lib/x86_64-linux-gnu/libssl.so/usr/lib/, Then specify--with-http_ssl_module when compiling the Nginx configuration. In addition, to run the OpenSSL command in the shell, also install the OpenSSL package, I use the o
-error.log;### SSL cert files ###ssl_certificate ssl/nixcraft.in.crt;ssl_certificate_key ssl/nixcraft.in.key;### Add SSL specific settings here ###keepalive_timeout 60;### Limiting Ciphers ######################### Uncomment as per your setup#ssl_ciphers HIGH:!ADH;#ssl_perfer_server_ciphers on;#ssl_protocols SSLv3;################################################# We want full access to SSL via backend ###location / {proxy_pass http://nixcraft;### force timeouts if one of backend is died ##proxy_
HTTPS is equal to HTTP plus TLS (SSL), and the HTTPS protocol has three main goals:
Data confidentiality. Ensure content is not seen by third parties during transmission. Just as the courier delivered the package, they couldn't know what was inside.Data integrity. Timely detection of transmission content tampered with by third parties. Just as the courier does not know what is in the package, but he may be
Nginx configuration and EXAMPLE_COM.CRT with the use of, need to take good care of, do not leak to any third party.
Third, Nginx configure HTTPS Web site and increase security configuration
As mentioned earlier, you will need to submit a CSR file to a third party SSL certification authority, after certification, they will issue you a CRT file, we named EXAMPLE
Nginx uses let's encrypt https certificate and enables http2 usage recordsLet's encrypt usage record
Certbot installation instructions
The document on certbot's official website about centos6 and 7 found a python problem during the installation process. python 2.6 installed in centos6 fails to run with python 2.6; python 2.7 is provided in centos7. If pip is not installed, you need to install it manually.
Nginx set up the HTTPS server configuration tutorial
First, make sure OpenSSL and Openssl-devel are installed on the machine.
#yum Install OpenSSL#yum Install Openssl-devel
And then you issue the certificate to yourself.
#cd/usr/local/nginx/conf#openssl Genrsa-des3-out Server.key 1024#openssl Req-new-key server.key-out SERVER.CSR#openssl rsa-in server.key-out
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.