・はじめに
apache2のドキュメントルートの
変更方法を以下に示しておく。
・方法
デフォルトの状態ではドキュメント
ルートは
/etc/apache2/sites-available
にある。設定ファイルを開く
$vim 000-default.conf
DocumentRoot /home/pi/Documents/myWeb/
この下に
DocumentRoot /home/pi/Documents/myWeb/
<Directory /home/pi/Documents/myWeb/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
を貼りつける。
ファイルほ保存して
$sudo a2dissite
で設定を反映させると
以下が表示される
Your choices are: 000-default
Which site(s) do you want to disable (wildcards ok)?
apache2を再起動
$sudo /etc/init.d/apache2 restart
もし記事が役立ったら↓の広告をクリック