linux 快速建站
方案:
web网站服务器:软件httpd、系统服务也是httpd
web网站浏览器:软件包elinks或者firefox
传输协议及端口:TCP 80
web网站服务端配置文件:
/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/*.conf
默认首页配置文件:index.html
网站文档的默认根目录:/var/www/html/
网址的基本组成:
http://服务器地址[:端口号]/目录/文件名
ftp://用户名:密码@服务器的地址[:端口号]/目录/文件名
1.安装软件包httpd
#yum -y install httpd
2.配置网站首页:
#vim /var/www/html/index.html
重启服务:
#systemctl restart httpd
通过访问域名实现网站访问:
1.修改/etc/hosts文件
#vim /etc/hosts
127.0.0.1 xieqc.cn
192.168.223.111 xieqc.cn
2.访问网站:
#firefox http://xieqc.cn
多个域名————>相同的网页内容
多个域名————>不同的网页内容
www.baidu.com map.baidu.com zhidao.baidu.com