- 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%。
2023年 4月現在、「nginx」26.23%、「Apache」20.68%、「OpenResty」10.17%、「Cloudflare」7.78%。
2023年12月現在、「nginx」22.83%、「Apache」22.74%、「Cloudflare」10.62%、「OpenResty」8.37%。
2024年 4月現在、「nginx」22.043%、「Apache」20.084%、「Cloudflare」10.45%、「OpenResty」10.16%。
2025年 4月現在、「nginx」20.79%、「Apache」15.43%、「Cloudflare」12.97%、「OpenResty」6.97%。
「nginx」微減。「Apache」激減。
「OpenResty」微増、「Cloudflare」激減というところでしょうか。
「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
たくさんのオプションがありますが、たいてい、デフォルトのままにしています。
問題があれば、後からいじっても間に合います。
今は、「MPM」の設定を「MPM_EVENT」にして、スレッドを動作させ、少しレスポンスがよくなるような設定にしています。
その他は、デフォルトのままいじっていません。
確認が終わったら、インストールします。
cd /usr/ports/www/apache24
make NO_DIALOG=yes
make install
3. インストール時のメッセージ
インストール時のメッセージを掲載しておきます。
===> Installing for apache24-2.4.63
===> Checking if apache24 is already installed
===> Registering installation for apache24-2.4.63
Installing apache24-2.4.63...
===> 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 built 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/
|
|