一、安装nginx
apt-get install nginx
二、配置nginx,在d.conf目录下新建test.conf
server{
listen 80;
server_name z.z.net;
location / {
root /myfile/hx/;
}
}
三、重启nginx
nginx -s reload
四、打开
http://z.z.net/index.html
原文:http://www.cnblogs.com/iloveyou-sky/p/7257180.html