FreeBSD 13.1 RELEASE - apache24 - 概要・インストール

 クラウディア
1. 概要
2. インストール
3. インストール時のメッセージ

1. 概要

 かつて、ウェブサーバでは、「apache」がもっともシェアが大きいものでした。  FreeBSD に限らず「Netcraft」の調査によれば、2015年10月、apache の使用率は 34.96% で 1位だったのです。  2016年6月に「Apache」37%、「IIS」36% と逼迫した状態になりました。  以降、逆転、再逆転の時期がありました。  2017年7月に「Apache」27%、「IIS」41% 以降は、差が縮まることはあるものの「IIS」の優勢は変わらず。  2018年よりまた「IIS」が伸び始めました。  2019年 6月、「nginx」32.97%、「Apache」28.08%、「IIS」15.39%。  2020年 7月、「nginx」36.00%、「Apache」25.45%、「IIS」12.52%。  2020年11月、「nginx」33.69%、「Apache」26.78%、「IIS」7.91%。  2021年 5月現在、「nginx」35.34%、「Apache」25.98%、「OpenResty」6.55%、「IIS」5.54%。  2022年 5月現在、「nginx」30.95%、「Apache」23.33%、「OpenResty」7.82%、「Cloudflare」5.45%。  「nginx」が微増、「Apache」微減、この2つのシェアは、だんだん広がっています。  とうとう「IIS」は、4位以内からはずれてしまいました。  「nginx」はまださわっていません。  「Apache」には長年安定した運用の実績があるので、未だに「Apache」を使用しています。  以下、「apache」の設定方法および apache で使用できるツールの設定について記述していきます。  「apache」でメジャーとなっているバージョンに「1.3」「2.0」「2.2」「2.4」と 4つの系列があります。  もう「1.3」を使う人はいないかと思います。  ここでは、「2.4」の設定方法ついて説明します。  というか、2020年7月13日に気づいて以降、「ports」には、「apache24」しか、存在しておりません。  ログローテーションに関しては「メンテナンス・トラブルシュート - ログ」の項をご参照ください。

2. インストール


cd /usr/ports/www/apache24
make config
 また、少し、オプションが増えたようです。  たくさんのオプションがありますが、たいてい、デフォルトのままにしています。  問題があれば、後からいじっても間に合います。
「FreeBSD 13.1 RELEASE」-「/usr/ports/www/apache24」「make config ①」
「FreeBSD 13.1 RELEASE」-「/usr/ports/www/apache24」「make config ②」
「FreeBSD 13.1 RELEASE」-「/usr/ports/www/apache24」「make config ③」
「FreeBSD 13.1 RELEASE」-「/usr/ports/www/apache24」「make config ④」
「FreeBSD 13.1 RELEASE」-「/usr/ports/www/apache24」「make config ⑤」
「FreeBSD 13.1 RELEASE」-「/usr/ports/www/apache24」「make config ⑥」
「FreeBSD 13.1 RELEASE」-「/usr/ports/www/apache24」「make config ⑦」
「FreeBSD 13.1 RELEASE」-「/usr/ports/www/apache24」「make config ⑧」
「FreeBSD 13.1 RELEASE」-「/usr/ports/www/apache24」「make config ⑨」
「FreeBSD 13.1 RELEASE」-「/usr/ports/www/apache24」「make config ⑩」
「FreeBSD 13.1 RELEASE」-「/usr/ports/www/apache24」「make config ⑪」

 今回は、「MPM」の設定を「MPM_EVENT」にして、スレッドを動作させ、少しレスポンスがよくなるような設定にします。
 その他は、デフォルトのままいじっていません。

 確認が終わったら、インストールします。


make
make install

3. インストール時のメッセージ

 インストール時のメッセージを掲載しておきます。  「FreeBSD 12.2 RELEASE」「FreeBSD 13.0 RELEASE」「FreeBSD 12.3 RELEASE」の間、リビジョンが変わっていない(「apache24-2.4.46_2」)ように認識していましたが。  今回は、だいぶ変わりました。

===>  Installing for apache24-2.4.53_1
===>  Checking if apache24 is already installed
===>   Registering installation for apache24-2.4.53_1
Installing apache24-2.4.53_1...
===> Creating groups.
Using existing group 'www'.
===> Creating users
Using existing user 'www'.
To run apache www server from startup, add apache24_enable="yes"
in your /etc/rc.conf. Extra options can be found in startup script.

Your hostname must be resolvable using at least 1 mechanism in
/etc/nsswitch.conf typically DNS or /etc/hosts or apache might
have issues starting depending on the modules you are using.


- apache24 default build changed from static MPM to modular MPM
- more modules are now enabled per default in the port
- icons and error pages moved from WWWDIR to DATADIR

   If build with modular MPM and no MPM is activated in
   httpd.conf, then mpm_prefork will be activated as default
   MPM in etc/apache24/modules.d to keep compatibility with
   existing php/perl/python modules!

Please compare the existing httpd.conf with httpd.conf.sample
and merge missing modules/instructions into httpd.conf!

===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/libexec/apache24/mod_cgid.so

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
https://httpd.apache.org/
ハイスピードプランマイニングベースStar Naming Gift