• Nginx配置https 之 找不到 ./configure


    Nginx配置https 之 找不到 ./configure

    需求

    要配置个https

    问题 找不到文件在哪里

    教程很简单,发现就是找不到 ./configure 这个文件
    这个文件是 安装包的文件,就是当初传到centos里面的目录。
    经过一通找,终于找到了 /nginx/nginx-1.18.0/

    资料

    Nginx配置https
    https://www.cnblogs.com/xiaoyaodijun/p/15744066.html

    小插曲

    此网站无法提供安全连接 nginx
    然后找了下细节,改完后ok了

        注意 这里我是从ucloud里面申请的ssl证书,具体每个人的证书,去自己平台申请。
    

    -listen 443;
    +listen 443 ssl;

    server {
                            listen       443 ssl;
                            server_name  www.vuejsdev.com #你们的域名,如www.abc.com;
                            ssl                  on;
                            ssl_certificate      /usr/local/nginx/public.pem; #根据实际的路径和文件名配置
                            ssl_certificate_key   /usr/local/nginx/private.key; #根据实际的路径和文件名配置
                            ssl_session_timeout  5m;
                            ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配
                            ssl_ciphers  ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配
                            ssl_prefer_server_ciphers   on;
                            location / {
                                root   html; #站点目录
                                index  index.html index.htm;
                }
        }
    

    后记2

    https 好使以后,之前的8080端口没有映射过来,想了半天,http 自动跳转 https 就是端口 80 -> 443 端口,所以之前的配置就要放到443的配置里面

    # 原来配置完https后,就走443的端口了,原先的配置 就都写到这里了
        server {
                            listen       443 ssl;
                            server_name  www.vuejsdev.com #你们的域名,如www.abc.com;
                            ssl                  on;
                            ssl_certificate      /usr/local/nginx/public.pem; #根据实际的路径和文件名配置
                            ssl_certificate_key   /usr/local/nginx/private.key; #根据实际的路径和文件名配置
                            ssl_session_timeout  5m;
                            ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配
                            ssl_ciphers  ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配
                            ssl_prefer_server_ciphers   on;
                            location / {
                                proxy_pass http://127.0.0.1:8080/;
                                #index  index.html index.htm;
                            }
                            
                            location /api/ {
                                proxy_pass http://127.0.0.1:8081;
                            }
            
                            #location / {
                            #    root   html; #站点目录
                            #    index  index.html index.htm;
                            #}
        }
    
  • 相关阅读:
    Python之标示符和关键字
    Python之变量以及类型
    python之注释的分类
    Python的环境的搭建
    Python之第一个helloworld的代码
    Linux_ubuntu-命令系统管理
    Linux_ubuntu命令-用户、权限管理
    Linux-ubuntu命令-文件、磁盘管理
    Linux_Ubuntu命令概述
    Linux-Ubuntu文件权限
  • 原文地址:https://www.cnblogs.com/pengchenggang/p/16546744.html
Copyright © 2020-2023  润新知