nginx的80端口配置两个Web服务

直接拷贝一份虚拟主机的配置即可

    server {
        listen 80;
        server_name www.jilinmei.com;
        root /home/xxx/site_1;
        passenger_enabled on;
    }

    server {
        listen 80;
        server_name blog.jilinmei.com;
        root /home/xxx/site_2;
        passenger_enabled on;
    }

重启nginx后生效

$ sudo service nginx restart

 

posted @ 2013-03-23 18:17  scige  阅读(875)  评论(0编辑  收藏  举报