美文网首页
nginx 配置杂记-1

nginx 配置杂记-1

作者: wo是大富 | 来源:发表于2017-06-10 17:38 被阅读0次

upstream backend {

server 1.1.1.1:8094;

server 1.1.1.2:8096;

}

server {

listen 80;

server_name xx.xx.com;

access_log /data/logs/xx/xx.xx.com.80.log main;

location ~ (/v1/terminal/\d+/measurement) {

default_type text/html;

return 200 'SUCCESS';

}

location ~ (/v1/terminal|/terminal) {

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

set $proxy_url http://backend;

proxy_pass $proxy_url;

}

location ~ (/v1/health|health) {

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_pass http://backend;

access_log /data/logs/xx/xx.health.log main;

}

location = /favicon.ico {

log_not_found off;

access_log off;

}

}

相关文章

网友评论

      本文标题:nginx 配置杂记-1

      本文链接:https://www.haomeiwen.com/subject/ukhcqxtx.html