Debian 10 Buster
Sponsored Link

Apache2 : ユーザーのホームディレクトリ領域を利用する2019/08/01

 
一般ユーザーが自身のホームディレクトリ内に置いたファイルを Web サイトとして公開できるようにします。
[1] userdir モジュールを有効にします。
root@www:~#
a2enmod userdir

Enabling module userdir.
To activate the new configuration, you need to run:
  systemctl restart apache2
root@www:~#
systemctl restart apache2

[2] 任意の一般ユーザーでテストページを作成して動作確認をします。正常にページが表示されれば OK です。
debian@www:~$
mkdir ~/public_html

debian@www:~$
vi ~/public_html/index.html
<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
UserDir Test Page
</div>
</body>
</html>
関連コンテンツ