Full HTTPS name
HTTPS (full name: Hypertext Transfer Protocol Secure) is an HTTP channel aimed at security. On the basis of HTTP, it ensures the security of the transmission process through transmission encryption and identity authentication. HTTPS adds SSL on the basis of HTTP, and the security basis of HTTPS is SSL, so the detailed content of encryption requires SSL. HTTPS has a different default port than HTTP and an encryption/authentication layer (between HTTP and TCP). The system provides authentication and encrypted communication methods. It is widely used in security-sensitive communications on the World Wide Web, such as transaction payments.
HTTPS has features
- Content encryption: using hybrid encryption technology, the middleman cannot directly view the plaintext content
- Verify identity: through certificate authentication, the client accesses its own server
- Protect data integrity: prevent the transmitted content from being impersonated or tampered by the middleman
Nginx configuration
[root@Nginx ~]# mkdir -p /usr/local/nginx/conf/ssl
[root@Nginx ~]# cp server.crt server.key /usr/local/nginx/conf/ssl/
[root@Nginx ~]# vim /usr/local/nginx/conf/nginx.conf
server {
listen 443; # 监听端口
ssl on; # 开启 SSL
ssl_certificate ssl/server.crt; # PS:我这里是相对路径. 你们可以使用绝对路径
ssl_certificate_key ssl/server.key; # 系统会在 /usr/local/nginx/conf/ 目录中寻找
server_name www.cuplayer.com; # 证书对应的域名
...
}
[root@Nginx ~]# nginx -s reload # 重启 Nginx 服务
Separate port 80 from port 443:
[root@Nginx ~]# vim /usr/local/nginx/conf/nginx.conf
server {
listen 80;
server_name www.cuplayer.com;
rewrite ^(.*)$ https://$host$1 permanent;
...
}
server {
listen 443;
ssl on;
ssl_certificate ssl/server.crt;
ssl_certificate_key ssl/server.key;
server_name www.cuplayer.com;
...
}
[root@localhost ~]# nginx -s reload
My Popular Article Recommendations
- Effect test of online cloud director switching for multi-channel live video broadcasting
- How to convert the video into a QR code, scan the code and play it directly?
- Which websites upload videos without inserting ads?
- How to generate a QR code from a video? Scan the QR code on WeChat to watch? no advertising
- Commonly used photo size comparison table, the size of the photo is right in this table
- Live Video Streaming Strategy (Push Streaming Interfaces of Major Platforms Organized)
- HTML5 video double speed playback function
- Teach you a trick: how to realize list playback of multiple videos?
- How to implement the function of playing videos in the video list on the WeChat public account
- H5 video double-speed playback function (an example of video multi-speed viewing function)
- How to configure an FTP server
- How to Upload Files Using FTP (FTP File Transfer)
- OBS Live Tool User Guide/Tool for Pushing Live Video Sources to Servers by OBS
- QQ browser hijacks the video tag to load its own advertisement (how to solve it?)