MonkeyCanCode opened a new pull request, #255: URL: https://github.com/apache/polaris-tools/pull/255
This PR fix issue reported in https://github.com/apache/polaris-tools/issues/249. So what happened here is we changed the console port number from original 80 (which caused issue in https://github.com/apache/polaris-tools/issues/231) to 4040 then changed to 8080 during recent helm re-work as suggested by the team (8080 for console, 8181 for polaris api, and 8182 for polaris metrics). However, this caused one issue when accessing console via domain name where end-users would be getting 404 for all endpoints. But this doesn't cause issue when accessing via `localhost` via port forwarding. Now this is actually due to the incorrect way of how we are using the Nginx UBI image. Following is the snippet for default `nginx.conf`. ``` ... # Load modular configuration files from the /etc/nginx/conf.d directory. # See http://nginx.org/en/docs/ngx_core_module.html#include # for more information. include /opt/app-root/etc/nginx.d/*.conf; server { listen 8080 default_server; listen [::]:8080 default_server; server_name _; root /opt/app-root/src; # Load configuration files for the default server block. include /opt/app-root/etc/nginx.default.d/*.conf; } } ... ``` What the dockerfile was doing earlier was creating a new server section via `include /opt/app-root/etc/nginx.d/*.conf;`. This was not a problem when we are using non-8080 port as that new server section would captured all. However, as we are using port 8080 with `server_name localhost`, it will covered the usage when accesing via 8080. The problem comes when we are using domain as the newly added server section won't catch it anymore and it will fall into second (original) one which yield 404. The fix in this PR is to ensure we only have one server running for nginx by inject our location blocks inside the UBI's existing default server. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
