1.修改个人主要配置文件
[root@dsrw ~]# vim /etc/httpd/conf.d/userdir.conf
17 # UserDir disabled 添加#号
24 UserDir public_html 去掉#号
2.在用户家目录中建立目录及首页面文件,并修改家目录权限
[root@dsrw ~]# su - dsrw
[dsrw@dsrw ~]$ mkdir public_html
[dsrw@dsrw ~]$ echo "This is dsrw's Personal Homepage" >public_html/index.html
[dsrw@dsrw ~]$ chmod -R 755 /home/dsrw
3.查询并过滤出所有与HTTP协议相关的安全策略。
[dsrw@dsrw ~]$ exit
注销
[root@dsrw ~]# getsebool -a|grep http
httpd_anon_write --> off
httpd_builtin_scripting --> on
httpd_can_check_spam --> off
httpd_can_connect_ftp --> off
httpd_can_connect_ldap --> off
httpd_can_connect_mythtv --> off
httpd_can_connect_zabbix --> off
httpd_can_network_connect --> off
httpd_can_network_connect_cobbler --> off
httpd_can_network_connect_db --> off
httpd_can_network_memcache --> off
httpd_can_network_relay --> off
httpd_can_sendmail --> off
httpd_dbus_avahi --> off
httpd_dbus_sssd --> off
httpd_dontaudit_search_dirs --> off
httpd_enable_cgi --> on
httpd_enable_ftp_server --> off
httpd_enable_homedirs --> off
httpd_execmem --> off
httpd_graceful_shutdown --> off
httpd_manage_ipa --> off
httpd_mod_auth_ntlm_winbind --> off
httpd_mod_auth_pam --> off
httpd_read_user_content --> off
httpd_run_ipa --> off
httpd_run_preupgrade --> off
httpd_run_stickshift --> off
httpd_serve_cobbler_files --> off
httpd_setrlimit --> off
httpd_ssi_exec --> off
httpd_sys_script_anon_write --> off
httpd_tmp_exec --> off
httpd_tty_comm --> off
httpd_unified --> off
httpd_use_cifs --> off
httpd_use_fusefs --> off
httpd_use_gpg --> off
httpd_use_nfs --> off
httpd_use_openstack --> off
httpd_use_sasl --> off
httpd_verify_dns --> off
mysql_connect_http --> off
named_tcp_bind_http_port --> off
prosody_bind_http_port --> off
4.开启httpd服务的个人用户主页功能,重新启动httpd服务
[root@dsrw ~]# setsebool -P httpd_enable_homedirs=on
[root@dsrw ~]# systemctl restart httpd
5.打开个人主页
[root@dsrw ~]# firefox
![图片[1]-3.2.3个人主页配置-大赛人网](https://www.dsrw.com/wp-content/uploads/2023/03/图片21-1-1024x118.png)
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容