self-hosted
self-hosted copied to clipboard
Add an nginx service to the outer layer and configure the location value (not /). How can nginx be configured to access the service normally?
Self-Hosted Version
master
CPU Architecture
x86_64
Docker Version
26.1.4
Docker Compose Version
2.27.1
Steps to Reproduce
The outer nginx configuration is:
server {
listen 80;
server_name test.com/;
location /minitor/ {
proxy_pass http://sentry-ip:9000/;
proxy_set_header Host $http_host; # 设置代理请求头中的 Host 字段
proxy_set_header X-Real-IP $remote_addr; # 设置代理请求头中的 X-Real-IP 字段
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 设置代理请求头中的 X-Forwarded-For 字段
}
}
When I visit http://test.com/mininor/ sentry server automatically redirected to the http://test.com/auth/login, did not carry / minitor /, lead to nginx proxy is less than 404 error occurs, How can I configure the sentry for normal access?
Expected Result
Address bar does not carry /minitor/:
Expect the address bar to carry /minitor/:
Actual Result
Expect static resources such as urls /js/css to be added with the /minitor/ prefix
Event ID
No response
Hi, it's nginx related. maybe you should work on how to rewrite the location directive. And for additional check configuration for system.url.prefix here https://github.com/getsentry/self-hosted/blob/master/sentry/config.example.yml#L83
Hi, it's nginx related. maybe you should work on how to rewrite the location directive. And for additional check configuration for system.url.prefix here https://github.com/getsentry/self-hosted/blob/master/sentry/config.example.yml#L83
Ok, thanks. I'll try to change the configuration at the right time