VirtualHosts ProxyPass ports on UCS appliance

Was sent here from the OwnCloud forums…

I have installed the OwnCloud Appliance with UCS (from the OwnCloud website), which puts OwnCloud in a docker container and UCS provides management for users and upgrades (and makes disk resizes hell).

Today I upgraded the OwnCloud “App” within UCS from 10.0.9 to 10.0.10. Before the upgrade I had added the following additional file in “/etc/apache2/sites-enabled” to allow OwnCloud be accessed from an external network and not have UCS page show up:

<VirtualHost *:80>
        ServerName domain_name
        ServerAlias [SERVER EXTERNAL IP]
        ServerAlias other_domain_name

        ProxyPass / http://127.0.0.1:40000/ retry=0
        ProxyPassReverse / http://127.0.0.1:40000/

</VirtualHost>

<VirtualHost *:443>
        ServerName domain_name
        ServerAlias [SERVER EXTERNAL IP]
        ServerAlias other_domain_name

        ProxyPass / https://127.0.0.1:40001/ retry=0
        ProxyPassReverse / http://127.0.0.1:40001/
</VirtualHost>

After the upgrade OwnCloud was not accessible externally. I opened “000-default.conf” in the same folder and noticed that the ProxyPass port has changed to 40003.

Is there any way to force the port to stay the same or a more elegant way to do the redirect as per the config above?

Hello @leviu,

if I understand correctly, your goal is that ownCloud shows up as default when accessing the webinterface instead of the UCS portal and management interface?
You can achieve this be changing the Apache2 startsite via this UCR variable:

apache2/startsite: univention/
 If the URL of the Apache server is accessed over the IP address 
 or the hostname, a redirect to the UCS startpage is done in the 
 standard setting. This variable allows the configuration of the 
 subpage where the redirect points to.

Just set this to owncloud/ instead of univention/.

For UCR, please have a look at the documentation. UCS uses template configuration files that are automatically re-written, e.g. during updates. Modifying those directly will end in a loss of your personal changes sooner or later. Most of the functionality can be changed via UCR variables, though.

Best regards,
Michael Grandjean

Great tip! Thanks.

I still have 2 problems:

  1. If I use an external address/hostname without “/owncloud” in the uri I do not get redirected to owncloud. After the timeout period I see the URI as http://files.mydomain.com:8080/owncloud/
  2. I do not want univention portale to be accessible from a public address.

I could not find other UCR variables to suit these needs.

~levi

Mastodon