server {
listen 80;
server_name localhost;
#charset koi8-r;
charset utf-8;
#access_log logs/host.access.log main;
location /report{
autoindex on;
autoindex_exact_size on;
autoindex_localtime on;
alias D:/apache-jmeter-5.4.1/report;
index index.html index.htm;
sub_filter 'Index of /report' 'API測試結(jié)果';
sub_filter 'Index of /report' 'API測試結(jié)果';
}
location /{
proxy_pass http://127.0.0.1:81;
}
location /sonar{
proxy_pass http://127.0.0.1:9000/sonar;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
……
……
}
JMETER報告發(fā)布到localhost:80/report下确镊;
禪道從81端口映射到80,發(fā)布到localhost:80/下范删;
SONAR從9000映射到蕾域,localhost:80/sonar。