首页 > 代码库 > centos7 install httpd
centos7 install 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
http://$ip/
[4]configure httpd server
# 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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。