16.04.6 LTS (Xenial Xerus)
※ $cat /etc/os-release
で確認。
/etc/apache2/apache2.conf
/etc/apache2/sites-available/example.com.conf
以下を実行するとsites-enabled
フォルダにシンボリックリンクが作成される。
$ cd /etc/apache2/sites-available
$ a2ensite example.com.conf
そして/etc/apache2/apache2.conf
に以下の記載があるため設定が読み込まれる。
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
/etc/apache2/apache2.conf
# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
/etc/apache2/envvars
export APACHE_RUN_USER=ubuntu
export APACHE_RUN_GROUP=www-data
User/Group ubuntu(1000)/33
ref. https://pgmemo.tokyo/data/archives/1065.html
/var/log/apache2/example.com.access.log
/var/log/apache2/example.com.error.log
/var/log/apache2/example.com.request_uri.log
/etc/letsencrypt/live/
直下
/etc/apache2/apache2.conf
に以下の記述あり。
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
LogFormat "%{REQUEST_URI}e" request_uri