Mac OSX - デフォルトのlocalhostフォルダはどこですか?

Mac OSX –デフォルトのlocalhostフォルダーはどこですか?

image

Mac OSXでは、デフォルトのlocalhostフォルダーは/Library/WebServer/Documentsにあります。

P.S Tested with MacOS Sierra, 10.12.6

httpd.confを見つける

デフォルトでは、Apacheが有効になっており、httpd.confファイル内の/etc/apache2/にインストールされています。DocumentRootを見つけて、デフォルトのlocalhostフォルダーがどこにあるかを確認してください。

sudo vim /etc/apache2/httpd.conf

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/Library/WebServer/Documents"

    #...