selinux 怪怪 - Linux

Table of Contents



正在練習selinux
兩台虛擬機

一台安裝了 httpd了

想說先 vim /etc/httpd.conf.d/userdir.conf


把 <ifmdule mod_userdir.c>
#UserDir disabled <--這個加註解

然後 userdir public_html 刪除註解

接下來 systemctl stop httpd
systemctl start httpd

切回 student 使用者

mkdir public_html

vim /home/student/public_html/index.html(準備測試用的網頁)

http://server19.example.com/~student/index.html

chmod 701 /home/student
exit(登出 student,回到 root)
sealert -a /var/log/audit/audit.log
setsebool -P httpd_enable_homedirs 1


在 另外一台 虛擬機yum install links
links -dump http://server19.example.com/~student/index.html


但是出現 host not found
求解QQ

--

All Comments

Gary avatarGary2017-08-30
檢查首頁目錄的context設定
Jake avatarJake2017-09-04
現在是出現404 not found
Delia avatarDelia2017-09-05
問userdir.conf設定,public_html和index.html權限及標
籤?