Difference between revisions of "Integration with UCS/Web interface"
From Univention Wiki
(Created page with "Category:App Center Developer Guide A web interface can be specified in the ini file: <pre> WebInterface=/myapp </pre> This will add a link on the overview page https:/...")
|Line 32:||Line 32:|
Revision as of 12:37, 8 November 2016
A web interface can be specified in the ini file:
This link can be customized further:
WebInterface=/myapp WebInterfacePortHTTP=8080 WebInterfacePortHTTPS=0
will add a link http://FQDN:8080/myapp. HTTPS links will not be created.
will hide this link completely on https://FQDN/ucs-overview.
For Docker Apps, the behaviour differs a bit:
WebInterface=/myapp WebInterfacePortHTTP=8080 WebInterfacePortHTTPS=8080 WebInterfaceProxyScheme=http
will create a link https://FQDN/myapp!
There is a mod_proxy integration in the App Center. It will route the Container's port 8080 to some port in the range of 40000 to 41000 on the Docker Host. This port is then used in the mod_proxy configuration on the Host to proxy /myapp on the Host to /myapp in the Container for the Host's ports 80 and 443. As WebInterfaceProxyScheme=http, even for 443 a HTTP connection is used between the Container and the Host.
- The "entry point" then needs to be /myapp. You cannot use /, as this would try to proxy / to /. This cannot be configured further as all links your application generates need to take /myapp into account.
Without help of the App Center
If your App runs on /, you cannot use the web interface integration of the App Center:
WebInterface=/ WebInterfacePortHTTP=8080 WebInterfacePortHTTPS=0 AutoModProxy=False PortsExclusive=8080
(See also Integration with UCS/Firewall)
You can set a link on the overview in the join script:
P="ucs/web/overview/entries/service" APP_PORT=8080 eval "$(ucr shell hostname domainname)" ucr set \ "$P/$APP"/description/de="Description of link to $APP (German)" \ "$P/$APP"/description="Description of link to $APP (English)" \ "$P/$APP"/icon="/url/to/icon/$APP.png" \ "$P/$APP"/label/de="Headline of link to $APP (German)" \ "$P/$APP"/label="Headline of link to $APP (English)" \ "$P/$APP"/link="https://$hostname.$domainname:$APP_PORT/myapp"
Do not forget to unset these variables in the unjoin script!