http://ry.tl/ユーザ名/でアクセスする方法
20160316

複数ユーザで別々にWEBページを管理する等、
「http://サイトアドレス/ユーザー名/ファイル名」でのアクセスをさせる為に必要な設定です。
確認環境
 CentOS7.x
⇒CentOS6.x以下の場合はhttp://ry.tl/ユーザ名/でアクセスする方法(CentOS6.x以下)ページにて。

 Apache
仕様
 ディレクトリ : /home/ユーザ名/public_html/
◆設定ファイルを書き換えましょう。
 [root@Server ~]# vi /etc/httpd/conf.d/userdir.conf
びふぉー
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid. This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
UserDir disabled

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disabled" line above, and uncomment
# the following line instead:
#
#UserDir public_html
</IfModule>

#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory "/home/*/public_html">
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Require method GET POST OPTIONS
</Directory>
あふたー
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid. This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
# UserDir disabled
#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disabled" line above, and uncomment
# the following line instead:
#
UserDir public_html
AliasMatch ^/([^/]+)/(.*) /home/$1/public_html/$2
</IfModule>

#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory "/home/*/public_html">
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Require method GET POST OPTIONS
</Directory>

環境によって.htaccessの使用を許可するなどの設定を行う事。
◆ユーザー作成時にWEBページ用ディレクトリを自動で作成されるようにする。
 [root@Server ~]# mkdir /etc/skel/public_html

◆最後に設定を反映
 [root@Server ~]# systemctl reload httpd