M
M
Mikklosh2018-05-17 14:34:39
Nginx
Mikklosh, 2018-05-17 14:34:39

Proxy and rewrite nginx how?

There is a server on which icinga is installed, let's say the address is 10.10.10.10, the corresponding icinga is available at 10.10.10.10/icingaweb2/, we need to make a proxy through nginx, the config looks like this:

server {
listen 80;
server_name monitoring.com;
location / {
proxy_pass 10.10.10.10/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_redirect default;
proxy_http_version 1.1;
}
}

This moment works without errors and the service becomes available at: monitoring.com/icingaweb2
Now you need to rewrite monitoring.com/icingaweb2 in monitoring.com - please tell me what needs to be added?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danil Sapegin, 2018-05-17
@ynblpb_spb

location / {
proxy_pass http://10.10.10.10/icingaweb2;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_redirect default;
proxy_http_version 1.1;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question