Xserver VPSでDebianサーバ構築/Webサーバ設定
ナビゲーションに移動
検索に移動
概要
次の表のとおりである。
Webサーバ | Apache |
証明書 | Let's Encrypt |
設定
以下の順に行う。
Apache設定
次のコマンドは、次項のcertbotコマンドにより有効化されるので、実行は不要である。
$ sudo a2enmod ssl $ sudo a2enmod rewrite $ sudo systemctl restart apache2
Let's Encrypt設定
次のコマンドを実行する。
$ sudo apt install python3-certbot-apache $ sudo certbot --apache
favicon.ico
/var/www/html/favicon.ico
analog
- /etc/analog.cfg
OUTFILE Report.html
$ analog /var/log/apache2/access.log* $ nkf --url-input Report.html > Report._dec.html
その他
Google Search Console
ドメインで登録する場合、TXTレコードをDNSサーバに設定する。
- https://www.mediawiki.org/wiki/Manual:Sitemap/ja
- https://www.mediawiki.org/wiki/Manual:GenerateSitemap.php/ja
MediaWiki バージョン: 1.32 – 1.39
php /usr/share/mediawiki/maintenance/generateSitemap.php --memory-limit=50M --fspath=/path/to/examplecom/sitemap/ --identifier=example.com --urlpath=/sitemap/ --server=https://www.example.com --compress=yes --skip-redirects
グローバルIP取得
Webサーバ
- /var/www/html/ip/index.php
<?php header("Content-Type: text/plain;charset=UTF-8"); echo $_SERVER['REMOTE_ADDR']; ?>
クライアント
$ curl https://SERVER/ip/
$ crontab -e 0 6 * * * curl -s https://SERVER/ip/ | mail -s "IP" MAIL