CentOS6.2部署Nginx虚拟主机(2)

#    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443;
    #    server_name  localhost;

#    ssl                  on;
    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

#    ssl_session_timeout  5m;

#    ssl_protocols  SSLv2 SSLv3 TLSv1;
    #    ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
    #    ssl_prefer_server_ciphers   on;

#    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
include linuxidc.conf;
include 88181.conf;
include androidj.conf;
}
[root@host1 conf]# cat linuxidc.conf
server {
        listen  80;
        server_name     ;
        access_log      logs/linuxidc.access.log;
        location / {
                index index.html;
                root html/linuxidc.com;
        }
}
[root@host1 conf]# cat 88181.conf 
server {
        listen  80;
        server_name     ;
        access_log      logs/88181.access.log;
        location / {
                index index.html;
                root html/88181.com;
        }
}
[root@host1 conf]# cat androidj.conf     
server {
        listen  80;
        server_name     ;
        access_log      logs/androidj.access.log;
        location / {
                index index.html;
                root html/androidj.com;
        }
}
[root@host1 conf]# nginx -t
the configuration file /data/nginx/conf/nginx.conf syntax is ok
configuration file /data/nginx/conf/nginx.conf test is successful
[root@host1 conf]# nginx

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/c91b376d50ea62c5a93aac81991ca338.html