ini docker-compose + flask + nginx + certbot nginx配置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ini docker-compose + flask + nginx + certbot nginx配置相关的知识,希望对你有一定的参考价值。

events {
}

http {
    upstream certbot_upstream{
        server certbot:80;
    }

    server {
        listen 80;
        server_name example.com;

        return 301 https://exmaple.com$request_uri;
    }

    server {
        listen 443 ssl;
        server_name example.com www.example.com;
        charset utf-8;

        ssl on;
        ssl_certificate /certs/fullchain.pem;
        ssl_certificate_key /certs/privkey.pem;

        location /static {
            alias /code/app/static;
        }

        location / {
            proxy_pass http://web:8000;
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_redirect off;
        }

        location /.well-known/acme-challenge {
            default_type "text/plain";
            proxy_pass http://certbot_upstream;
        }

        include  /etc/nginx/mime.types;
    }
}

以上是关于ini docker-compose + flask + nginx + certbot nginx配置的主要内容,如果未能解决你的问题,请参考以下文章

Docker-Compose Postgresql 导入转储

Grafana安装与配置

Grafana安装与配置

Grafana安装与配置

如何在 Docker 中使用 Grafana 的自定义 ini 文件?

资产监测设备中HCL190FLAS擦写问题分析——BOOT