Apache简介
Apache HTTP Server(简称Apache)是 Apache 软件基金会的一个开放源码的网页服务器,可以在大多数计算机操作系统中运行,由于其多平台和安全性[1]被广泛使用,是最流行的 Web 服务器端软件之一。它快速、可靠并且可通过简单的 API 扩展,将Perl/Python等解释器编译到服务器中。
Apache 支持许多特性,大部分通过编译的模块实现。这些特性从服务器端的编程语言支持到身份认证方案。一些通用的语言接口支持Perl,Python, TCL, 和 PHP。流行的认证模块包括 mod_access, mod_auth 和 mod_digest。其他的例子有 SSL 和 TLS 支持 (mod_ssl), 代理服务器 (proxy) 模块,很有用的URL重写(由 mod_rewrite 实现),定制日志文件 (mod_log_config),以及过滤支持(mod_include 和 mod_ext_filter)。Apache 日志可以通过网页浏览器使用免费的脚本 AWStats 或 Visitors 来进行分析。
部署Apache服务
# 安装http服务
# yum install -y httpd
# 启动http服务
# systemctl start httpd
# 查看apache的网络端口信息
# netstat -antuple | grep httpd
配置Apache服务
#查看apache的网络端口信息
# netstat -antuple | grep httpd
tcp6 0 0 :::80 :::* LISTEN 0 26089 1199/httpd
#切换到apache服务的目录下,为默认发布目录
# cd /var/www/html
#在http目录下编辑文件,并在网页进行验证,此文件为默认发布文件。
# vim index.html
<h1>hello,world!</h1> #编辑的文件内容,此时在网页网文时字体偏大并且加粗
#如果编辑的内容,hello,world!此时在网页访问字体偏小,不加粗
#修改配置后,要重启Apache服务
# systemctl restart httpd
最后一步:进行网页验证:
http://192.168.233.128/index.html