zoukankan      html  css  js  c++  java
  • 使用 docker 部署 typecho 的 nginx 配置文件

    savokiss.com.conf

    server {
        listen 443 ssl http2 reuseport;
        server_name savokiss.com www.savokiss.com;
        root /var/www/html/savokiss.com;
        index index.php;
        include /etc/nginx/conf.d/ssl.config;
    
        access_log /var/log/nginx/typecho_access.log main;
    
        if (!-e $request_filename) {
            rewrite ^(.*)$ /index.php$1 last;
        }
    
        location ~ .*.php(/.*)*$ {
            include        fastcgi_params;
            fastcgi_param  PATH_INFO $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED $document_root$fastcgi_path_info;
            fastcgi_param  SCRIPT_NAME $fastcgi_script_name;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_index  index.php;
    
            fastcgi_pass   phpfpm:9000;
        }
    }
    server {
        listen       80;
        server_name  savokiss.com  www.savokiss.com;
        rewrite ^(.*) https://savokiss.com$1 permanent;
    }

    上面的 phpfpm 是在 docker run 时指定的 link 到该 container 内部的名称

    ssl.config

        ssl_certificate /etc/nginx/conf.d/cert/perm.pem;
        ssl_certificate_key /etc/nginx/conf.d/cert/perm.key;
        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout 5m;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
  • 相关阅读:
    0x1L
    失败全是无能,成功多是侥幸。
    也谈不甘
    维护网站小笔记
    C#反射(二) 【转】
    C#反射(一) 【转】
    短期学习目标
    局域网手机遥控关机
    密码验证
    字符串反转
  • 原文地址:https://www.cnblogs.com/savokiss/p/11620892.html
Copyright © 2011-2022 走看看