HTTPリクエストによってNginxの設定を動的に変更するAPI
dockerを用意し、以下コマンドを実行する。
$ docker-compose build
$ docker-compose up
以上の操作により、4567
番ポートでアプリケーションが起動する。
Gemfile
にGemを追加し、以下のコマンドを実行する。
$ docker-compose exec app bundle install
t-space front-nginx config replace api
Nginxのログを取得可能なAPIを作る.
アクセスログとエラーログが
/access_log/$(domain)
のようなURLから読み取れるようにする
Let's EncryptのSANs上限は100件。
現状1枚の証明書で回しているので詰む。
また証明書のSANsを見ると公開されてるサービス一覧が知られてしまうのでよくない。
プロジェクトごとに証明書を上手い具合に切るようにしたい。
Gallery側で認証を行うようにしたので、それに追従した形の設定がはき出せるように対応させる
むき出しでどこからでも叩けるのはよくないよなって。
証明書発行上限にいつまでも引っかかる
上限は以下の通り
現状の仕様ではドメインのリクエストがくると,そのドメインをSANに含めた証明書を新規に発行
するようになっている。
これだと20回以上リクエストが来た時点であぼーんする。
これをなんとかする
具体的には
証明書発行を定期実行ジョブにして対応する
これで100件まではちゃんと対応できるし20枚の発行上限には引っかからない
Web1側との兼ね合いもあるので100件以上の対応は今後考えていく
Let's Encryptの証明書期限は3ヶ月。
特に更新処理を行わないので、何もないまま3ヶ月経つと死ぬ。
戻す値. plainでログ.
基本的にファイルの中身をそのままplainではき出せばいいと思う
ファイルが存在しなかったら404を返す?
併せてt-space側のnginx-clientの構成も見直す
色々と詰め込んできた結果闇を抱えてきて
色々と辛くなってきた リファクタをしたい
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.