标签:centos httpd
[1]Install Httpd for Centos7-media
# yum --enablerepo=centos7-media -y install httpd Installed: httpd.x86_64 0:2.4.6-18.el7.centos
[2]start httpd,开机启动
# systemctl start httpd.service # systemctl enable httpd.service ln -s ‘/usr/lib/systemd/system/httpd.service‘ ‘/etc/systemd/system/multi-user.target.wants/httpd.service‘
[3]Test Access httpd
# rm -f /etc/httpd/conf.d/welcome.conf #删除默认欢迎界面 # vi /etc/httpd/conf/httpd.conf 86 ServerAdmin linux_zcy@163.com 95 ServerName mariadb.carso.cn:80 151 AllowOverride All 164 DirectoryIndex index.html index.cgi index.php 配置文件最后添加: ServerTokens Prod # 禁止显示或发送Apache版本号 KeepAlive On
# systemctl restart httpd.service
# vi /var/www/html/index.html <html> <body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;"> Welcom to Carson Space! </div> </body> </html>
[5]访问测试
Welcom to Carson Space!
本文出自 “西伯利亚·狼” 博客,请务必保留此出处http://kernal.blog.51cto.com/8136890/1531545
centos7 install httpd,布布扣,bubuko.com
标签:centos httpd
原文地址:http://kernal.blog.51cto.com/8136890/1531545