yum install httpd -y
vim /etc/httpd/conf/httpd.conf(默认Listen 80)//80默认是Web端口 可以修改8080
cd /etc/httpd/conf.d (删除阿帕奇默认的欢迎页面welcome.conf)
systemctl start httpd //启动httpd服务
systemctl enable httpd //开机自启动httpd
semanage port -a -t http_port_t -p tcp 8080
vim /etc/httpd/conf.d/autoindex.conf
IndexOptions FancyIndexing HTMLTable VersionSort 修改为
IndexOptions FancyIndexing HTMLTable VersionSort NameWidth=*
systemctl restart httpd
最后把目录和文件放在目录 /var/www/html目录下就可以了 通过 ip:端口 来访问