简介
名词:HTML(超文本标记语言),网站(多个网页组成一台网站),主页,网页,URL(统一资源定位符)
网站架构:LAMP(linux(系统)+apache(服务器程序)+mysql(数据库管理软件)+php(中间软件))
静态站点
Apache基础
Apache官网:www.apache.org
软件包名称:httpd
服务端口:80(http)/443(https)
主配置文件:/etc/httpd/conf/httpd.conf
子配置文件:/etc/httpd/conf.d/*.conf
主目录:/var/www/html(网站源代码默认位置)
安装Apache
cat /etc/redhat-release -查看内核版本systemctl stop firewalld -停止防火墙
systemctl disable firewalld
setenforce 0 -停止安全组件
vim /etc/selinux/configyum -y install httpd -下载apache并启动
systemctl start httpd
systemctl enable httpd
systemctl status httpdhttpd -v -查看版本
虚拟主机
简介
作用:在一台物理服务器上运行多个网站
类型:基于主机名
实战
服务端
准备网站源码目录
mkdir /var/www/html/a.org -创建网站源码目录
vim /var/www/html/a.org/index.html -输入网页内容mkdir /b.org
vim /b.org/index.html