我将apache配置为liferay tomcat的反向代理,在liferay tomcat上配置了5个虚拟主机,下面的配置用于从apache提供错误页面.
Alias /error/ "/usr/share/apache2/error/"
Options -Indexes
ProxyPassMatch /error/(403|5xx) !
ProxyErrorOverride On
ErrorDocument 500 /error/5xx/500.html
ErrorDocument 403 /error/403/403.html
Run Code Online (Sandbox Code Playgroud)
问题是由于ProxyErrorOverride,apache也提供404次命中,有没有办法可以绕过404以便从后端服务器提供服务?
这样我可以为不同的虚拟主机分别设置404页面.由于未在apache上配置虚拟主机,因此我无法告诉apache为不同的站点提供不同的错误页面.
我想继续从apache服务403和500,所以ProxyErrorOverride不能关闭.
count({__name__=~".+"})查询仅显示 9 但prometheus_tsdb_head_series显示 837 计数,知道为什么会有这种差异吗?两个查询不相似吗?
这是抓取配置:
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus-1'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9090']
labels:
env: local
metric_relabel_configs:
- source_labels: [__name__]
regex: (prometheus_tsdb_head_series)
action: keep
- job_name: 'node_exporter-1'
static_configs:
- targets: ['localhost:9100']
labels:
env: local
metric_relabel_configs:
- source_labels: [__name__]
regex: (?i)(metric1|metric2|metric3)
action: keep
Run Code Online (Sandbox Code Playgroud)