1.重定向
- (1)服务端配置
cd /usr/local/nginx/conf/切换到nginx服务器的配置目录下
vim nginx.conf 编辑配置文件
当访问域名 www.westos.org时,实际上访问的是 /web/index.html文件
128 server {
129 listen 80; # 监听80端口
130 server_name www.westos.org; # 定义域名
131
132 location / {
133 root /web;
134 index index.html;
135 }
136 }
mkdir /web建立目录
vim /web/index.html
写入www.westos.org's page