网站建设资讯

NEWS

网站建设资讯

nginx的小总结(三)

nginx小总结,虚拟主机的配置

成都创新互联公司服务项目包括乐陵网站建设、乐陵网站制作、乐陵网页制作以及乐陵网络营销策划等。多年来,我们专注于互联网行业,利用自身积累的技术优势、行业经验、深度合作伙伴关系等,向广大中小型企业、政府机构等提供互联网行业的解决方案,乐陵网站推广取得了明显的社会效益与经济效益。目前,我们服务的客户以成都为中心已经辐射到乐陵省份的部分城市,未来相信会继续扩大服务区域并继续获得客户的支持与信任!

user nginx nginx;

worker_processes 1;

events {
worker_connections 1024;
use epoll;
}

http {
include mime.types;
default_type application/octet-stream;

sendfile on;
keepalive_timeout 65;

server {

listen 80;
server_name www.example.com *.example.com;

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

listen 80;
server_name qq.example.com;

location / {

root html;
index index.html index.htm;
}
}
server {

listen 80;
server_name qq.example.com;

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

}

配置如上,还是比较容易理解的,只是多添加了一个server的区域,于是就有两个了,注意,这里本人使用的是相对路径!

本文标题:nginx的小总结(三)
URL分享:http://cdweb.net/article/cjseie.html