Why URL configuration matters
The SMP REST API embeds absolute URLs in its XML responses. For example, a ServiceGroup response includes the full URL for each service metadata endpoint. If the SMP generates URLs based on the internal Tomcat address (http://localhost:8080/smp/...) rather than the public address (https://smp.example.org/...), SMP clients will fail to dereference those links.
Force root path
When Tomcat deploys the WAR under a context path (e.g./smp) but the reverse proxy strips that prefix before forwarding, set smp.forceroot to true:
application.properties files. Set it to false only if you deploy without a proxy and want the context path preserved in URLs.
Explicit public URL
Setsmp.publicurl to override the base URL used for all absolute URL generation:
Public URL mode
Whensmp.publicurl is not set, the server derives the base URL from the incoming request. The smp.publicurl.mode property controls which source is used:
| Value | Description |
|---|---|
request | Derive the base URL from the HTTP request itself (scheme, host, port). Default. Works when the proxy preserves the original Host header and the scheme. |
x-forwarded-header | Read X-Forwarded-Proto, X-Forwarded-Host, and X-Forwarded-Port headers set by the proxy. Use when your proxy sets these non-standard headers. |
forwarded-header | Read the RFC 7239 Forwarded header. Use when your proxy sets the standardized Forwarded header. |
Nginx configuration example
Apache HTTP Server configuration example
Context path considerations
If you deploy the WAR under a context path (e.g. Tomcat withsmp.war placed in webapps/smp/), the application runs at http://localhost:8080/smp/. When the proxy strips the /smp prefix:
- Set
smp.forceroot = trueso internal links use/rather than/smp/. - Set
smp.publicurl = https://smp.example.orgso absolute URLs in API responses are correct.
HTTPS termination at the proxy
phoss SMP does not need to handle TLS directly when HTTPS is terminated at the proxy. The proxy accepts HTTPS connections and forwards plain HTTP to Tomcat. This is the recommended production architecture.Ensure the proxy forwards the original scheme to the application (via
X-Forwarded-Proto: https or the Forwarded header). Otherwise the SMP may generate http:// URLs in responses even though clients connect over HTTPS.Encoded slash handling
Some participant identifiers contain encoded slashes (%2F). Tomcat 10+ requires explicit configuration to decode these in URL paths: