nginx二级域名转发,配置文件

ubantu系统

自定义一个配置文件

路径:/etc/nginx/conf.d/

 

server {
    listen 80;              #设置端口
    server_name api.dzzhyl.cn;             #设置二级域名
    location / {
         root /home/myuser/;             #设置网页文件路径
         index index.html;                  #检索格式
    }
}

重启服务

posted @ 2020-05-14 09:56  虞岩  阅读(1546)  评论(0)    收藏  举报