在ngnix里面配置路径显示静态页面

1.首先连接vagrant ssh

2.进入 /etc/nginx/conf.d/

3.用sudo vim cll.conf  //分开建新的conf 用来区分不同项目

4.把以下配置添加进去

 server {
            listen       80;
            server_name  tam.out.dz11.com;
            root         /home/www/kk/;
} 

5.保存推出

6.重启nginx      sudo  service nginx restart

7.配置本地的host   xxx.xxx.xxx.xxx(虚拟机ip)    cll2.develop.dz11.com cll.kk.dz11.com

posted on 2017-03-15 16:24  taoshengyijiuai  阅读(133)  评论(0编辑  收藏  举报