nginx 配置杂记-1

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)