owncloud / qnap

App for qnap - license defines number of allowed users - this app disables those over the limit
GNU General Public License v2.0
3 stars 3 forks source link

[QA] config setting overwrite.cli.url does not match #36

Closed jnweiger closed 3 years ago

jnweiger commented 3 years ago

Seen with with ownCloud for QNAP 10.8.0 from ownCloud_10.8.0_arm-x41.qpkg (dated 2021-07-27)

After a fresh install, config.php has this:

...
  'overwritewebroot' => '/owncloud',
  'overwrite.cli.url' => 'http://localhost/',
  'htaccess.RewriteBase' => '/',
...

Expected behaviour: overwrite.cli.url should say either https://10.90.4.178/owncloud or http://10.90.4.178:8080/owncloud

(The trusted_domains setting in config.php looks odd with the port number included, but it is not effective. It is a wildcard setting as defined in overwrite.config.php -- GOOD.)

jnweiger commented 3 years ago

Fixing overwrite.cli.url does not seem to help with #30 or #23

wkloucek commented 3 years ago

cannot be set as a default since we don't know the ip address / port / hostname of the device in a user's network. But it should be documented how user can set this with the special QNAP config file. It must be ensured that it will not be overwritten by the docker image configuration.

wkloucek commented 3 years ago

@EParzefall could you please add a section to the documentation about configuring a static host name and so on for OC on QNAP ( I took the settings from here: https://doc.owncloud.com/server/admin_manual/configuration/server/reverse_proxy_configuration.html#overwrite-parameters).

The user does not need to do this since oC will come in a "dynamic" mode and will adapt to what ever IP address or hostname the user can reach the QNAP device. In some cases like exposing the device to the internet, some people may want to configure it like a "real server"...

The user can configure their settings in the user.config.php like this:

<?php
$CONFIG = array(
    'overwriteprotocol' => 'https',
    'overwritehost' => '10.90.4.174',
    'overwrite.cli.url' => 'https://10.90.4.174/owncloud/',
);

The config report show that the values from the user.config.php are actually applied:

{
    ...
    "config": {
        "overwrite.cli.url": "https:\/\/10.90.4.174\/owncloud\/",
        "overwriteprotocol": "https",
        "overwritehost": "10.90.4.174",
        ...
    },
    ...
EParzefall commented 3 years ago

Thanks for the info, will be added to the docs.

jnweiger commented 3 years ago

Retested with https://github.com/owncloud/qnap-packaging/releases/download/v10.8.0.0-rc3/ownCloud_10.8.0.0-r_x86_64.qpkg

wkloucek commented 3 years ago

@jnweiger existing doc is also in this PR https://github.com/owncloud/docs/pull/3792, though I don't know if the trusted_domains is there (to give users an hint when its applicable and when not)