作者qoooooooo123 (天邊的一沱屎)
看板Linux
標題[問題] selinux 怪怪
時間Sat Aug 26 11:43:40 2017
正在練習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
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.216.90.99
※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1503719024.A.64A.html
推 purplvampire: 檢查首頁目錄的context設定 08/26 18:10
→ qoooooooo123: 現在是出現404 not found 08/27 16:58
→ ddtsatan: 問userdir.conf設定,public_html和index.html權限及標 08/30 04:38
→ ddtsatan: 籤? 08/30 04:38