// 最大连接数
events {
use epoll;
worker_connections 20480;
}
//反向代理:
//访问 zs.kangehao.com
//端口号80然后跳转到,htts://www.baidu.com
//location指令说明
server {
listen 80;
server_name zs.kangehao.com;
location / {//这里的 / 是一个匹配url的 如果不是/ 是 res
那么访问的网站就是 zs.kangehao.com:80/res才会跳转下面的网站
root /data/www/shanzhuzishou/www;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
}
server {
listen 80;
server_name zs.kangehao.com;
location / {
root /data/www/shanzhuzishou/www;
index index.html index.htm;
try_files $uri $uri/ /index.html;
proxy_pass htts://www.baidu.com
}
}