esig/dss-demonstrations

Configuration of the demonstration webapp's ip and port

Closed this issue · 2 comments

Hi. I'm trying to figure out how to configure the ip and port of the webapp's HTTP server.

I've followed the thread of the startup procedure and found that the file dss-demo-bundle-5.11.1/apache-tomcat-8.5.82/conf/server.xml can be used to set the port by changing the value in the <Connector> tag. Are there other methods exposed to configure the webserver?

In particular:

  • Is there a way to configure the port via environment variables? The configuration file makes automatic deployment of the webapp a little cumbersome, as the port has to be configured by in-file substitution of the port value.
  • Is there a way to configure the loopback ip address for the server to bind to? For example, is it possible to use 127.255.0.1 instead of ipv4 localhost?

Hi @slavistan ,

DSS does not expose variables for server settings configuration, as the project is only a demo and not meant to be used in production.
However, you may try to use maven-assembly-plugin to provide a custom server.xml configuration file. For that you will need to put a modified server.xml file within resources/tomcat/conf/ folder and the assembly-plugin will substitute the file when building the bundle.

Probably, there should be also other ways to automate the configuration but that is out of scope of DSS and I personally did not test that much.

Best regards,
Aleksandr.

@bsanchezb Thank you very much. I'll try out your suggestion.