Apache2 / Ubuntu 17.04
1. Apache2 をインストールする。
root@www:~# apt -y install apache2
2. Apache2 の基本設定。
root@www:~# vi /etc/apache2/conf-enabled/security.conf
# 25行目:変更
ServerTokens Prod
root@www:~# vi /etc/apache2/mods-enabled/dir.conf
# 2行目:ディレクトリ名のみでアクセスできるファイル名を設定
DirectoryIndex index.html index.htm
root@www:~# vi /etc/apache2/apache2.conf
# 70行目:サーバー名追記
ServerName www.pidam.net
root@www:~# vi /etc/apache2/sites-enabled/000-default.conf
# 11行目:管理者アドレス変更
ServerAdmin webmaster@pidam.net
root@www:~# systemctl restart apache2
3 動作確認。