Difference between revisions of "Integration with UCS/Web interface"

From Univention Wiki

Jump to: navigation, search
Line 36: Line 36:
 
</pre>
 
</pre>
  
will create a link https://FQDN/myapp!
+
will support http://FQDN/myapp and 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.
 
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.

Revision as of 12:39, 8 November 2016


A web interface can be specified in the ini file:

WebInterface=/myapp

This will add a link on the overview page https://FQDN/ucs-overview to https://FQDN/myapp. The same link will appear in the App Center module of the Univention Management Console.

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.

UCSOverviewCategory=False

will hide this link completely on https://FQDN/ucs-overview.

Docker Apps

For Docker Apps, the behaviour differs a bit:

WebInterface=/myapp
WebInterfacePortHTTP=8080
WebInterfacePortHTTPS=8080
WebInterfaceProxyScheme=http

will support http://FQDN/myapp and 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.

Important
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!

Personal tools