ZabbixのHTTPを httpd -> Nginxに変更する
一通り CentOS7 + MySQL 5.7 + Zabbix 3.4 + PHP 7.x で構築できたので
今更な Apache(httpd)じゃなくて、他のサーバーでも使っている Nginx に変更
1. Zabbix Server と httpd の停止
# systemctl stop zabbix-server # systemctl stop httpd
2. Nginxのインストール
Nginxのサイトにしたがい https://nginx.org/en/linux_packages.html#mainline
mainlineのレポジトリを追加
# cat > /etc/yum.repos.d/nginx.repo [nginx] name=nginx repo baseurl=http://nginx.org/packages/mainline/centos/7/$basearch/ gpgcheck=0 enabled=1 <ここで Ctrl+D で出力終了> # chmod 644 /etc/yum.repos.d/nginx.repo # # yum install nginx
nginxを起動してWelcomページが表示されるか確認
# systemctl start nginx
3. PHPのモジュールをインストール
既に入っているものもあるが、次回構築時に判るようにするために
# yum install php-mbstring php-pdo php-xml php-zip php-fpm php-mysqlnd
4. PHP-fpmの設定変更
apach向けになっているので、Nginxに変更
# vi /etc/php-fpm.d/www.conf user = nginx group = nginx
# chown -R nginx:nginx /var/lib/php/session/
PHP-fpmの起動
# systemctl start php-fpm
5. Nginxの設定変更
/etc/nginx/conf.d 以下のdefault.conf をコピーして修正する
default.conf については、conf.bak などにリネームしておかないと /zabbix/ では失敗する
http://www.hogehoge.com/ で表示させる場合と
httpd の時と同様に http://www.hogehoge.com/zabbix/ で表示させる方法があるのだが
どちらが良いのかイマイチわからない
取り敢えず今回は後者の config
# cp -p /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/zabbix.conf # vi /etc/nginx/conf.d/zabbix.conf location / { root /usr/share/nginx/html; index index.html index.htm; } location /zabbix { alias /usr/share/zabbix; index index.php; if (!-e $request_filename) { rewrite ^/zabbix(.+)$ /zabbix/index.php?q=$1 last; break; } } location ~ ^/zabbix/.+\.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^/zabbix(.+\.php)(.*)$; fastcgi_param SCRIPT_FILENAME /usr/share/zabbix$fastcgi_script_name; include fastcgi_params; }
パーミッションを変更
# chown nginx:nginx /etc/zabbix/web # chown nginx:nginx /etc/zabbix/web/zabbix.conf.php
6. Nginx再起動とZabbix Server起動
# systemctl reload nginx # systemctl start zabbix-server
7. 自動起動設定
# systemctl disable httpd # systemctl enable nginx # systemctl enable php-fpm
8. http://www.hogehoge.com/ で起動する nginx conf
こちらで運用する場合もあるので記述
# vi /etc/nginx/conf.d/zabbix.conf location / { root /usr/share/zabbix; index index.php; } location ~ \.php$ { root /usr/share/zabbix; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
こっちのほうがお手軽なので、これでもいいかなあと
CentOS7をZabbixで監視する
Zabbix Serverの構築はできたので
取り敢えず Linux (CentOS) Agentを入れて、Linux Templateまで適用してみようかと
1. Zabbix Repositoryを導入
https://www.zabbix.com/jp/download ここから、Repositoryを選択して
# rpm -i https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm warning: /var/tmp/rpm-tmp.VSZpP1: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY # # yum repolist zabbix/x86_64 Zabbix Official Repository - x86_64 223 zabbix-non-supported/x86_64 Zabbix Official Repository non-supported - x86_64 4
2. Zabbix Agentのインストール
# yum info zabbix-agent Available Packages Name : zabbix-agent Arch : x86_64 Version : 3.4.14 Release : 1.el7 Size : 367 k Repo : zabbix/x86_64 Summary : Zabbix Agent URL : http://www.zabbix.com/ License : GPLv2+ Description : Zabbix agent to be installed on monitored systems. # # yum install zabbix-agent
GPG KEYの警告がでるけど、「Y」をおして Agentをインストール
3. zabbix_agentd.conの修正
環境に合わせて以下を修正する
# vi /etc/zabbix/zabbix_agentd.conf server=<Zabbix Server IP> ServerActive=<Zabbix Server IP> HostnameItem=system.hostname <- 有効化
4. Zabbix Agentの起動と自動起動設定
# systemctl status zabbix-agent ● zabbix-agent.service - Zabbix Agent Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; disabled; vendor preset: disabled) Active: inactive (dead) # # systemctl start zabbix-agent # systemctl status zabbix-agent ● zabbix-agent.service - Zabbix Agent Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; disabled; vendor preset: disabled) Active: active (running) since Tue 2018-09-18 02:21:12 JST; 1s ago Process: 2480 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS) Main PID: 2482 (zabbix_agentd) CGroup: /system.slice/zabbix-agent.service tq2482 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf tq2483 /usr/sbin/zabbix_agentd: collector [idle 1 sec] tq2484 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection] tq2485 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection] tq2486 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection] mq2487 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec] Sep 18 02:21:12 rep2 systemd[1]: Starting Zabbix Agent... Sep 18 02:21:12 rep2 systemd[1]: PID file /run/zabbix/zabbix_agentd.pid not readable (yet?) a...art. Sep 18 02:21:12 rep2 systemd[1]: Started Zabbix Agent. Hint: Some lines were ellipsized, use -l to show in full. # # systemctl enable zabbix-agent Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-agent.service to /usr/lib/systemd/system/zabbix-agent.service. # # systemctl status zabbix-agent ● zabbix-agent.service - Zabbix Agent Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2018-09-18 02:21:12 JST; 3min 12s ago Main PID: 2482 (zabbix_agentd) CGroup: /system.slice/zabbix-agent.service tq2482 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf tq2483 /usr/sbin/zabbix_agentd: collector [idle 1 sec] tq2484 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection] tq2485 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection] tq2486 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection] mq2487 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec] Sep 18 02:21:12 rep2 systemd[1]: Starting Zabbix Agent... Sep 18 02:21:12 rep2 systemd[1]: PID file /run/zabbix/zabbix_agentd.pid not readable (yet?) a...art. Sep 18 02:21:12 rep2 systemd[1]: Started Zabbix Agent. Hint: Some lines were ellipsized, use -l to show in full. #
5. Zabbix Server <-> Agentの疎通確認
zabbix_get コマンドを使用して、Agentと通信できることを確認する
Zabbix Serverで以下を実行
# zabbix_get -s <Agent IP> -k system.hostname <- Agentのホスト名 # zabbix_get -s <Agent IP> -k agent.version <- AgentのVer
6. Zabbix Serverに登録
あとはよしなに
CentOS7 + Zabbix + MySQL その3
CentOS7 + Zabbix + MySQL 本題その2
1. Zabbixリポジトリを追加
で、ようやく本題のZabbixインストールまでたどり着いたわけだが(苦笑
標準/EPELリポジトリのZabbixはVerが古い為にZabbixのサイトからリポジトリを追加
https://www.zabbix.com/jp/download
Zabbix Ver : 3.4
OS : CentOS
OS Ver : 7
Database : MySQL
でリポジトリを選択
# rpm -i https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm warning: /var/tmp/rpm-tmp.ZQQqQO: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY
Signature Warningが出るが問題は無し
# yum repolist zabbix/x86_64 Zabbix Official Repository - x86_64 223 zabbix-non-supported/x86_64 Zabbix Official Repository non-supported - x86_64 4
Zabbix Official RepoがInstallされていることを確認
2. Zabbix Server / Agentインストール
zabbix-web-japaneseは、Webで日本語フォントを使えるようにする為に必要
zabbix-getは、zabbix-agetとの疎通確認にも使うのでいれておくrp
# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent # yum install zabbix-web-japanese # yum install zabbix-get
3. MySQLのZabbix初期設定
# mysql -uroot -p password mysql> create database zabbix character set utf8 collate utf8_bin; mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<パスワード>'; mysql> quit;
4. 初期データとスキーマのインポート
# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix Enter Password: #
5. Zabbix Server と MySQLの接続設定
/etc/zabbix/zabbix_server.conf のDBPasswordを設定
125行目あたりに追記
DBPassword=<パスワード>
6. PHPのTIMEZONE変更
/etc/httpd/conf.d/zabbix.conf の PHP TIMEZONEを修正
# php_value date.timezone Europe/Riga
これを
php_value date.timezone Asia/Tokyo
7. Zabbix Server/Agent起動
# systemctl restart zabbix-server zabbix-agent httpd # systemctl enable zabbix-server zabbix-agent httpd
8. http://Server IP or Hostname/zabbix/ にアクセス
CentOS7 + Zabbix + MySQL (Zabbixインストールする前に)
Zabbixインストールするまでの、PHP / MySQLのインストールと初期設定で長くなったので
今回はそれまでの前振りということで _no
自宅内Network機器のトラフィック見たりするのに
Zabbixのグラフ機能使ってみようかなと思ってみたりしたので
CentOS7はminimalでインストール完了
EPELリポジトリも Installしている状況
1. ユーザー作成
2. sshdの設定変更
3. chrony 導入
4. 不要サービスの停止
但し、CentOS7では、PHPは5.x系、MySQLはインストールされておらず互換DBのMariDB Liblaryがインストールされている
1. PHP 7.x系のインストール
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
PHP 7.3のrepoを有効化
(今回 7.3を使用しているが現時点ではRCなので、7.2のほうが良いと思われる)
# vi /etc/yum.repos.d/remi-php73.repo # sdiff -s /etc/yum.repos.d/remi-php73.repo /etc/yum.repos.d/remi-php73.repo.20180917 enabled=1 | enabled=0 # yum repolist remi-php73 Remi's PHP 7.3 RPM repository for Enterprise Linux 7 - x86_64 219 remi-safe Safe Remi's RPM repository for Enterprise Linux 7 - x86_64 3,015
これでupdateを実行すると、PHP 5,x が PHP 7.3系にUpdateされる
# yum update
2. MySQL 5.7のインストール
MariaDBのライブラリが導入されているので、バッティングを防ぐ為に削除する
# rpm -qa | grep maria mariadb-libs-5.5.60-1.el7_5.x86_64 # yum remove mariadb-libs-5.5.60-1.el7_5.x86_64 # rm -rf /var/lib/mysql/
# yum install http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm # yum repolist mysql-connectors-community/x86_64 MySQL Connectors Community 65 mysql-tools-community/x86_64 MySQL Tools Community 69 mysql57-community/x86_64 MySQL 5.7 Community Server 287
MySQL Serverインストール
# yum install mysql-community-server
インストールされた MySQL Serverの自動起動設定の確認と起動
基本自動起動は enableになってるっぽい??
# systemctl list-unit-files --type service | grep mysql mysqld.service enabled mysqld@.service disabled # # systemctl status mysqld ● mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: inactive (dead) Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html # systemctl start mysqld # systemctl status mysqld ● mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2018-09-17 03:08:35 JST; 11s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 10265 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS) Process: 10192 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS) Main PID: 10268 (mysqld) CGroup: /system.slice/mysqld.service mq10268 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid Sep 17 03:08:08 zabbix systemd[1]: Starting MySQL Server... Sep 17 03:08:35 zabbix systemd[1]: Started MySQL Server.
無事起動!!
rootユーザーの初期パスワードは構築時にランダムで設定され /var/lib/mysqld.log に出力されている
# grep password /var/log/mysqld.log 2018-09-16T18:08:21.211929Z 1 [Note] A temporary password is generated for root@localhost: sE7P&KJweq4H
3. MySQLの初期設定
MySQL では最低限のセキュリティ設定をしてくれる mysql_secure_installation なるツールがあるのでそれを実行
具体的には
- root ユーザーのパスワードの変更
- VALIDATE PASSWORD プラグインのインストール
- ポリシーに沿った root ユーザーパスワードの設定 (VALIDATE PASSWORD プラグインをインストールした場合)
- anonymous ユーザーの削除
- リモートホストから root ユーザーでログインするのを禁止する
- testデータベースの削除 (存在する場合)
# mysql_secure_installation Securing the MySQL server deployment. Enter password for user root: New password: Re-enter new password: ... Failed! Error: Your password does not satisfy the current policy requirements New password: Re-enter new password: The 'validate_password' plugin is installed on the server. The subsequent steps will run with the existing configuration of the plugin. Using existing password for root. Estimated strength of the password: 100 Change the password for root ? ((Press y|Y for Yes, any other key for No) : y New password: Re-enter new password: Estimated strength of the password: 100 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? (Press y|Y for Yes, any other key for No) : y Success. Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y Success. By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y - Dropping test database... Success. - Removing privileges on test database... Success. Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y Success. All done!
なんか、パスワードのセキュリティ強度が最初から middleになっとった _no
自宅内でし使わないのにこんな強度いらないということで
# mysql -uroot -p Enter Password: mysql> show variables like 'validate_password%'; +--------------------------------------+--------+ | Variable_name | Value | +--------------------------------------+--------+ | validate_password_check_user_name | OFF | | validate_password_dictionary_file | | | validate_password_length | 8 | | validate_password_mixed_case_count | 1 | | validate_password_number_count | 1 | | validate_password_policy | MEDIUM | | validate_password_special_char_count | 1 | +--------------------------------------+--------+ 7 rows in set (0.00 sec) mysql> set global validate_password_policy=LOW; Query OK, 0 rows affected (0.00 sec) mysql> show variables like 'validate_password%'; +--------------------------------------+-------+ | Variable_name | Value | +--------------------------------------+-------+ | validate_password_check_user_name | OFF | | validate_password_dictionary_file | | | validate_password_length | 8 | | validate_password_mixed_case_count | 1 | | validate_password_number_count | 1 | | validate_password_policy | LOW | | validate_password_special_char_count | 1 | +--------------------------------------+-------+ 7 rows in set (0.00 sec) mysql> set password = password('<新しいパスワード>');
MySQL からデフォルトのパスワード有効期限が 360日になったので、無期限に
ついでに文字コードについても UTF-8 を初期値にするように [mysqld] セレクションに追加
# vi /etc/my.cnf # cat /etc/my.cnf <省略> [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock character-set-server = utf8 default_password_lifetime = 0 <省略>
設定変更をしたので、mysqld を再起動
# systemctl restart mysqld.service
そして、再起動をしたらパスワード強度が元に戻っておった _no
初期値が MIDIUM らしいので、 /etc/my.cnf で初期設定しないと再起動の度に MIDIUM に戻るようで
# vi /etc/my.cnf # cat /etc/my.cnf <省略> [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock character-set-server = utf8 default_password_lifetime = 0 validate_password_policy=LOW <省略> # systemctl restart mysqld.service # mysql -uroot -p Enter password: mysql> show variables like 'validate_password%'; +--------------------------------------+-------+ | Variable_name | Value | +--------------------------------------+-------+ | validate_password_check_user_name | OFF | | validate_password_dictionary_file | | | validate_password_length | 8 | | validate_password_mixed_case_count | 1 | | validate_password_number_count | 1 | | validate_password_policy | LOW | | validate_password_special_char_count | 1 | +--------------------------------------+-------+ 7 rows in set (0.00 sec)
よっしゃ!!!
mysql_secure_installation を実行する前に、 /etc/my.cnf に追記して再起動しておくのがいいな
(長いので分けました)
CentOS7で NIC名称を変更する
CentOS7になってから、NIC名称が ensXXX みたいになった
これはこれで良いんだけど、なんか数字がランダムすぎて良くわからん
ので、ethXの時代の手法にのっとって ens0 にでも変更する
1. /etc/default/grub に追記
GRUB_CMDLINE_LINUX="rd.lvm.lv=zabbix/root rd.lvm.lv=zabbix/swap rhgb quiet"
を
GRUB_CMDLINE_LINUX="rd.lvm.lv=zabbix/root rd.lvm.lv=zabbix/swap net.ifname=0 rhgb quiet"
に修正
2. grubのconfig反映
# grub2-mkconfig -o /boot/grub2/grub.cfg
3. /etc/sysconfig/network-scripts/ifcfg-ensXXX を修正
# mv /etc/sysconfig/network-scripts/ifcfg-ensXXX /etc/sysconfig/network-scripts/ifcfg-ens0 # vi /etc/sysconfig/network-scripts/ifcfg-ens0
DEVICE、NAMEを修正して
UUIDを削除して、HWADDR (Mac Address)に修正する
4. OS再起動
基本これでいったけど、ホントは色々あるっぽい
RTX 1200/1210 完全初期化手順
パスワード忘れた場合や、取り外した機器に一々繋いで初期化するのが面倒臭い時に
MiscoSD + USB + DOWNLOAD の3ボタンを押しながら電源投入
RTX1210にLua導入
RTX1200の IPsec スループットが200Mbpsでそろそろ厳しくなってきたのと
RTX1210の中古もそれなりの価格になってきたので導入
DDNSで自宅の環境を一部公開しているので
Luaスクリプトの導入を
1. ガーベージコレクトの実行
Flash ROM領域の為に、基本は追記書き込み、容量一杯になったらガーベージコレクト実行という仕様
GC実行時の数十秒は通信も止まる為に、最初にGC実行
> administrator Password: # rtfs garbage-collect RTFS garbage collecting... Done. #
2. USB FlashにLuaスクリプトコピー
3. USB FlashをRTX1210に接続
4. LuaスクリプトをRTX1210にコピー
# show file list / # show file list usb1:/ # make directory /lua # copy usb1:/<FILE>.lua /lua/ # show file list /
5. 動作確認
# lua <FILE>.lua
6. ファイル or ディレクトリを削除するときは
# delete /lua/<FILE>
MyDNS.jpでLet’s Encrypt DNS認証
certbotツールは、HTTP/HTTPS認証の場合80/443 portがほぼ必須みたいなので、portを変更してたり、https onlyだったりすると認証でコケル
(というかProtocol指定やPort指定してるのに、デフォルトで通信にくんなや)
かといって、MyDNS.jpだと、_acme-challenge TXTレコード登録がサポートしていなのだけど
MyDNS.jp自らが、Let’s Encrypt DNS認証ツールを公開してくれたので
詳細はこちら
-> https://github.com/disco-v8/DirectEdit/
基本この通りにやればいいんだけど
1. certbot導入
2. 各種ツール導入
なぜかreadmeどおりに、wgetしたらunzipできなかったので
# mkdir /etc/letsencrypt/DirectEdit-master # chmod 700 /etc/letsencrypt/DirectEdit-master # cd /etc/letsencrypt/DirectEdit-master/ # wget https://raw.githubusercontent.com/disco-v8/DirectEdit/master/txtdelete.php # wget https://raw.githubusercontent.com/disco-v8/DirectEdit/master/txtedit.conf # wget https://raw.githubusercontent.com/disco-v8/DirectEdit/master/txtregist.php # chmod 600 ./*.conf # chmod 700 ./*.php
3. txtedit.conf修正
$MYDNSJP_MASTERID = 'yourmasterid'; $MYDNSJP_MASTERPWD = 'yourpasswd'; $MYDNSJP_DOMAIN = 'yourdomain';
4. certbotで証明書取得
--dry-runオプションで事前チェックしておくのが良いかも
certbot certonly --manual --preferred-challenges=dns \ --manual-auth-hook /etc/letsencrypt/DirectEdit-master/txtregist.php \ --manual-cleanup-hook /etc/letsencrypt/DirectEdit-master/txtdelete.php \ -d <Domain> \ --server https://acme-v02.api.letsencrypt.org/directory \ --agree-tos -m <Mail Address> --manual-public-ip-logging-ok
5. 無事成功して /etc/letsencrypt/live/
IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/<Domain>/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/<Domain>/privkey.pem Your cert will expire on 2018-11-30. To obtain a new or tweaked version of this certificate in the future, simply run certbot again. To non-interactively renew *all* of your certificates, run "certbot renew" - If you like Certbot, please consider supporting our work by: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le
6. Nginxのconf書き換え
Nginxのドメイン設定ファイルを以下に修正
server { listen <Port> ssl http2; server_name <Domain>; ssl_certificate /etc/letsencrypt/live/<Domain>/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/<Domain>/privkey.pem; ssl_session_timeout 1d; ssl_session_cache shared:SSL:50m; ssl_session_tickets on;
7. Nginxのreload
Configチェックして問題なければ reload
# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful # systemctl restart nginx
8. サイトにアクセスして証明書が更新されているか確認
一応これでいけることが判った
あとは毎月一回コマンドを実行すれば、証明書が更新される
後日自動実行するように仕込む予定だけど、cron嫌いなんだよねえ
ま、業務とかみたいに何十台もLinuxあるわけじゃないから、各サーバーで何が実行されてるかよくわからないことにはならないけど
http/https認証は、httpが必須っぽかったり、Portがデフォルト必須ぽいので
個人的に建てているサイトの場合はこれが一番いいかね