assalammualaikum wr wb
Pada kesempatan kali ini saya akan sharing mengenai, konfigurasi user dir pada apache di redhat 8, user dir digunakan untuk memanfaatkan directory user untuk dapat digunakan seolah sebagai directory root pada apache.

1. Pertama kita dapat mengakses userdir.conf pada apache, untuk mengakses conf anda dapat menggunakan conf editor seperti nano atau vi, setelah itu anda dapat edit beberapa konfigurasi yang ada pada .conf tersebut, untuk script nya anda dapat lihat dibawah ini. 
-
[root@redhat ~]#nano /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 All
    Options None
    Require method GET POST OPTIONS
</Directory>

-

2. Setelah itu anda dapat melakukan restart service httpd/apache, jika setelah proses restart service langsung pada masuk enter baru pada cli maka berhasil, jika belum maka anda dapat mengecek script nya lagi pada .conf.
[root@redhat ~]#systemctl restart httpd
3. Jika service sudah berhasil restart anda dapat enable selinux untuk homedir.
[root@redhat ~]#setsebool -P httpd_enable_homedirs on
[root@redhat ~]#restorecon -R /home
4. Selanjutnya anda dapat membuat public_html pada directory user anda.
[root@redhat ~]#mkdir /home/redhat/public_html

5. Anda dapat memberikan hak khusus untuk directory tersebut dengan menggunakan chmod.
[root@redhat ~]#chmod 711 /home/redhat
[root@redhat ~]#chmod 755 /home/redhat/public_html

6. Buatlah sebuah test dengan berisikan file html, anda dapat menggunakan conf editor seperti nano.
[root@redhat ~]#nano /home/redhat/public_html/index.html

 7. Setelah itu anda dapat mengakses nya dengan cara buka browser anda dan tuliskan alamat dengan format berikut, http://alamat ip atau domain/~user/namafile.html atau jika menggunakan index.html maka akan terpanggil secara otomatis.

 Sekian dari saya untuk sharing ini
semoga bermanfaat bagi anda dan terimakasih.