The difference between http and https is
Some websites, when http is opened, the page prompts that it is not safe. For example, if you click on the following website [actually the same website]
How can I get rid of this unsafe prompt? Upgrading from http to https
Look at the final effect:
If you currently have a website, how do you upgrade it? For https
Domain name: 511easy.com
Once you have a domain name, you can apply for a free SSL certificate, as shown in the screenshot below, based on the certificates of each web server. I use nginx
Then you need to configure the nginx.conf configuration, probably using the third one below, the first two are what I use to save.
Compared with http, https is more secure, but not necessarily. Use jmeter/charles/wireshark/fiddle, etc. to generate a certificate, and you can easily capture packets of https websites. Most websites and apps. I can capture packets
upstream tomcatserver1 { server 127.0.0.1:8083; } upstream tomcatserver2 { server 127.0.0.1:8085; } server { listen 80; server_name 511easy.com; location / { proxy_pass http://tomcatserver1; index index.html index.htm; } } server { listen 80; server_name 511easy.com; location / { proxy_pass http://tomcatserver2; index index.html index.htm; } }
worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name 88bugs; location / { proxy_pass http://localhost:8083; } } server { listen 80; server_name jenkins; location / { proxy_pass http://localhost:8080; } } }
worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 443 ssl; server_name www.511easy.com; ssl on; ssl_certificate 1_511easy.com_bundle.crt; ssl_certificate_key 2_511easy.com.key; ssl_session_timeout 5m; location / { proxy_pass http://localhost:8083; } } }
Consolidate the meaning of these abbreviations
http ---hyper text transfer protocol, hypertext transfer protocol, is a protocol built on tcp Stateless connection, the entire basic workflow is that the client sends an http request
https ---- hyper text transfer protocol over secure socket layer or hypertext transfer protocol secure
The full name is: Hypertext Secure Transfer Protocol, which can be simply understood as the http protocol that uses ssl encrypted transmission
The default port of http is 80, and the default port of https is 443
ssl is A security protocol that provides security and data integrity for network communications.
Why use https
In order to protect the security of information transmission and data integrity. It makes visitors feel that the website is trustworthy, and for the domestic network environment, it can also prevent broadband operators from forcing advertisements on the website.
If you want two ports on one server to execute different ports with different domain names, nginx can be configured like this
worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 443 ssl; server_name www.88bugs.com; ssl_certificate 1_88bugs.com_bundle.crt; ssl_certificate_key 2_88bugs.com.key; ssl_session_timeout 5m; location / { proxy_pass http://localhost:8083; } } server { listen 443 ssl; server_name www.511easy.com; ssl_certificate 1_511easy.com_bundle.crt; ssl_certificate_key 2_511easy.com.key; ssl_session_timeout 5m; location / { proxy_pass http://localhost:8085; } } }
The above is the detailed content of How to upgrade Nginx from http to https. For more information, please follow other related articles on the PHP Chinese website!

NGINX can be used to serve files and manage traffic. 1) Configure NGINX service static files: define the listening port and file directory. 2) Implement load balancing and traffic management: Use upstream module and cache policies to optimize performance.

NGINX is suitable for handling high concurrency and static content, while Apache is suitable for dynamic content and complex URL rewrites. 1.NGINX adopts an event-driven model, suitable for high concurrency. 2. Apache uses process or thread model, which is suitable for dynamic content. 3. NGINX configuration is simple, Apache configuration is complex but more flexible.

NGINX and Apache each have their own advantages, and the choice depends on the specific needs. 1.NGINX is suitable for high concurrency, with simple deployment, and configuration examples include virtual hosts and reverse proxy. 2. Apache is suitable for complex configurations and is equally simple to deploy. Configuration examples include virtual hosts and URL rewrites.

The purpose of NGINXUnit is to simplify the deployment and management of web applications. Its advantages include: 1) Supports multiple programming languages, such as Python, PHP, Go, Java and Node.js; 2) Provides dynamic configuration and automatic reloading functions; 3) manages application lifecycle through a unified API; 4) Adopt an asynchronous I/O model to support high concurrency and load balancing.

NGINX started in 2002 and was developed by IgorSysoev to solve the C10k problem. 1.NGINX is a high-performance web server, an event-driven asynchronous architecture, suitable for high concurrency. 2. Provide advanced functions such as reverse proxy, load balancing and caching to improve system performance and reliability. 3. Optimization techniques include adjusting the number of worker processes, enabling Gzip compression, using HTTP/2 and security configuration.

The main architecture difference between NGINX and Apache is that NGINX adopts event-driven, asynchronous non-blocking model, while Apache uses process or thread model. 1) NGINX efficiently handles high-concurrent connections through event loops and I/O multiplexing mechanisms, suitable for static content and reverse proxy. 2) Apache adopts a multi-process or multi-threaded model, which is highly stable but has high resource consumption, and is suitable for scenarios where rich module expansion is required.

NGINX is suitable for handling high concurrent and static content, while Apache is suitable for complex configurations and dynamic content. 1. NGINX efficiently handles concurrent connections, suitable for high-traffic scenarios, but requires additional configuration when processing dynamic content. 2. Apache provides rich modules and flexible configurations, which are suitable for complex needs, but have poor high concurrency performance.

NGINX and Apache each have their own advantages and disadvantages, and the choice should be based on specific needs. 1.NGINX is suitable for high concurrency scenarios because of its asynchronous non-blocking architecture. 2. Apache is suitable for low-concurrency scenarios that require complex configurations, because of its modular design.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

WebStorm Mac version
Useful JavaScript development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
