初期費用無料、月額990円から、高速・多機能・高安定レンタルサーバー『エックスサーバー』
taisuke@ubuntuserver:~$ sudo apt -y install apache2
taisuke@ubuntuserver:~$ sudo vi /etc/apache2/conf-enabled/security.conf
#12行目 : 変更
ServerTokens Prod
taisuke@ubuntuserver:~$ sudo vi /etc/apache2/mods-enabled/dir.conf
DirectoryIndex index.html index.htm
taisuke@ubuntuserver:~$ sudo vi /etc/apache2/apache2.conf
#70行目 : サーバー名追記
ServerName ご自身の自宅サーバーのドメイン名
taisuke@ubuntuserver:~$ sudo vi /etc/apache2/sites-enabled/000-default.conf
#11行目 : 管理者のメールアドレスを変更
ServerAdmin メールアドレス
taisuke@ubuntuserver:~$ sudo systemctl restart apache2
ローカルホスト または任意のクライアントコンピューターから Web ブラウザーで [http://(サーバーのホスト名 または IP アドレス)/] にアクセスします。 以下のようなページが表示されれば OK です。
初期費用無料、月額990円から、高速・多機能・高安定レンタルサーバー『エックスサーバー』
ubuntu 24.04 LTSで自宅サーバー構築(Apache2の設定)
Last updated at Posted at 2024-08-10
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme