惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

博客园 - 笨功夫才是真功夫

TortoiseSVN实现excel文件差异比对(集成ExcelMerge)[转] git仓库迁移 在Debian12上安装mysql 8.0 Mysql8.0设置大小写不敏感解决方案[转] debian下常见问题 vue开发环境搭建 bash脚本的输入参数解析 python常用脚本 mysql数据库备份脚本 redis安装和运维 docker环境下安装RabbitMQ Linux系统设置开机启动(草稿) 在Windows10部署kibana Elasticsearch监控 Flink cdc实践(陆续更新) 在windows下安装mysql 8.1 VMware虚拟机开机自动启动 停止windows10的系统更新 elasticsearch安装-集群 elasticsearch安装-单实例
centos7.6 nginx配置ssl证书
笨功夫才是真功夫 · 2024-12-22 · via 博客园 - 笨功夫才是真功夫

1、Linux(Centos7.6)Nginx安装部署并配置SSL证书(简单方便版)

https://blog.csdn.net/m0_63684495/article/details/128748310

2、解决nginx: [emerg] the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx的问题

https://blog.csdn.net/guo_qiangqiang/article/details/95622649

3、使用Let's Encrypt 安装配置免费SSL 证书教程

https://www.cnblogs.com/88223100/p/Generate-free-SSL-certificates-through-Let_s-Encrypt.html

4、如何在 Debian 12、11 或 10 上用 Let's Encrypt 加密 Nginx —— 未验证过

https://tigress.cc/2024/07/02/nginx-https/

nginx.conf内容


#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  xxxx.com;

        #将所有HTTP请求通过rewrite指令重定向到HTTPS。
        rewrite $(.*)$ https://$host$1;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            #root   html;
            #index  index.html index.htm;
            root /xxxx/website;
            index index.html index.htm;
        }


        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        } 

         
    }


        #以下属性中,以ssl开头的属性表示与证书配置有关。
        server {
            listen 443 ssl;
            #配置HTTPS的默认访问端口为443。
            #如果未在此处配置HTTPS的默认访问端口,可能会造成Nginx无法启动。
            #如果您使用Nginx 1.15.0及以上版本,请使用listen 443 ssl代替listen 443和ssl on。
            server_name xxxx.com;
            root html;
            index index.html index.htm;
            ssl_certificate  /xxx/ssl_files/fullchain.crt;
            ssl_certificate_key /xxx/ssl_files/private.pem;
            ssl_session_timeout 5m;
            ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
            #表示使用的加密套件的类型。
            ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
            #表示使用的TLS协议的类型,您需要自行评估是否配置TLSv1.1协议。

            ssl_prefer_server_ciphers on;
            location / {
                root   /xxxx/website;  #网站根目录
                index  index.html index.htm;
            }
        }
}