Spring Boot 2.7.6
file:application.properties config:
server.port=8080
server.servlet.context-path=/fx
management.server.port=18080
management.endpoint.shutdown.enabled=true
management.endpoints.web.exposure.include=*
curl http://localhost:8080/fx/actuator/health returns
{"status":"UP","groups":["liveness","readiness"]}
curl http://localhost:18080/fx/actuator/health returns
<!doctype html><html lang="en"><head><title>HTTP Status 404 – Not Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 – Not Found</h1></body></html>
Comment From: bclozel
Thanks for getting in touch, but it feels like this is a question that would be better suited to StackOverflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.
In this case, I believe that using the management.server.base-path property could help.