カテゴリー: Linux

Linux

Nginx リバースプロキシにてドメインを変数にする場合の設定例

  Nginxのリバースプロキシで、プロキシ先にドメインを含める場合は、単純に行うとNginxがDNSをキャッシュしてしまって、プロキシ先のIPが変わった場合に障害になります。 Nginx設定時にvalid=5sを加える Nginx設定時に変数にURLを一旦持たせる プロキシ先のDNSレコードのTTLを5秒程度に短くする 例の場合はhoge.example.netのTTLを5にする この …

Linux

[Solved] Supervisor FATAL Exited too quickly (process log may have details)

  Laravelのqueue workerを使っていたらFATALで死んでいた   一時対応として、 start allさせることでRUNNINGにははなった。 設定に加える The total number of seconds which the program needs to stay running after a startup to consider the s …

MySQL, AWS, Linux

Resolved [mysqlbinlog] ERROR: Got error reading packet from server: Could not find first log file name in binary log index file

      mysqlbinlog: unknown option –raw ??   解決 MySQL ClientがMariadbになっていた。 RDSはMySQL5.7なので これで実行できた    

Linux

Postfix Untrusted TLS connection established to aspmx.l.google.com

  Untrusted TLS connection established to xxx 暗号化はできてるけど、信用されていない><       よし🐱 Trusted TLS connection established to aspmx.l.google.com[xxx.xxx.xxx.xxx]:25: TL  

Linux

[Solved] Let’s Encrypt Could not bind TCP port 80 because it is already in use by another process on this system (such as a web server)

更新コマンドが失敗する場合 環境に合わせて「–apache」や「–nginx」オプションを追加してあげる   このブログのWebサーバはNginなので「–nginx」を追加した     更新に成功した🐱✨    

Linux

【Soved】Nginx [crit] 20655#20655: *56 open() “/var/log/nginx/xxxx.access.log” failed (13: Permission denied) while logging request

PHP-FPMからNginxへのログへの書き込みができない時に発生する。 NginxのuserとPHP-FPMの実行userを合わせてあげれば解決できる       既存ログへの対応   あとlogrotateも対応する