Httpサーバ
yum install httpd systemctl enable httpd systemctl start httpd
で立ち上がるWebサーバ、curl localhost で内容も確認できます。
ここで気になったのがWelcomeページのhtmlがどこにあるか。
DocumentRootにはない
設定ファイルを見に行くと
# cat /etc/httpd/conf/httpd.conf | grep -i root # with "/", the value of ServerRoot is prepended -- so 'log/access_log' # with ServerRoot set to '/www' will be interpreted by the # ServerRoot: The top of the directory tree under which the server's # ServerRoot at a non-local disk, be sure to specify a local disk on the # same ServerRoot for multiple httpd daemons, you will need to change at ServerRoot "/etc/httpd" # httpd as root initially and it will switch. ServerAdmin root@localhost # DocumentRoot: The directory out of which you will serve your DocumentRoot "/var/www/html"
/var/www/htmlにあると思いきやファイルは空。
# ls /var/www/html/
というわけで
# find / | grep index.html
で総当たりすると発見。
/usr/share/httpd/noindex/index.html
にあるみたいです。
確かにいじるとcurlで見えるhtmlが変わりました。メモ。