×
新网 > 虚机资讯 > 正文

nginx的小总结(三)

  • 作者:未知
  • 来源:
  • 2018-05-09 18:09:50

nginx小总结,虚拟主机的配置 user nginx nginx; worker_processes  1; events {     worker_connections  1024;     use  epoll; } http {     include       mime.types;     default_type  application/octet-stream;

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

user nginx nginx;

002UASMrzy7605pjKJv15&690.jpg
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的区域,于是就有两个了,注意,这里本人使用的是相对路径!

 

  • 相关专题

免责声明:本文内容由互联网用户自发贡献自行上传,本网站不拥有所有权,也不承认相关法律责任。如果您发现本社区中有涉嫌抄袭的内容,请发送邮件至:operations@xinnet.com进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。

免费咨询获取折扣

Loading