Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - AleksKur

#1
Hi!
I have setup nginx with https reverse proxy successfully so I think the bit regarding basic config nuances I can skip in my explanation.
However I want to make some "routing" based on "URL Pattern" (location) and doesn't work correctly for me.
My current setup is that when I come on https://mymain.com it is being reverse proxied to http://myback.com:9000 (running GrayLog web ui). All good here.

But I want to make it working that when coming on https://mymain.com/logs then it should be revproxied to http://myback.com:9000. So I changed
"URL Pattern" under Location to "/logs" with "Match Type: Case Insensitive" (tbh tried all available options for Match type). Now when I am coming to https://mymain.com I am getting 404 which is good. When I am coming on https://mymain.com/logs - I am getting only Title of the web ui and page is just blank. I did some troubleshooting and it appears that next browser should be loading /config.js from the webserver but it is failing - and Nginx error log is showing the following:
*4 open() "/usr/local/etc/nginx/html/config.js" failed (2: No such file or directory), client: 123.123.250.14, server: mymain.com, request: "GET /config.js HTTP/2.0", host: "mymain.com", referrer: "https://mymain.com/logs"
That log indicates to me that for some reason Nginx is not trying to proxy that request and instead trying to serve config.js from OPNsense box which obviously doesn't exist.

What did I do wrong in my configuration? In my understand all requests towards https://mymain.com/logs/* should be translated/proxied to http://myback.com:9000/* or I am wrong??