Docker: Question: Is there a simple way to change the base URL?

Created on 7 Oct 2017  路  3Comments  路  Source: nextcloud/docker

Hello,

I wonder if there is a simple way to change the base URL, i.e. instead of serving nextcloud from https://example.com/, could I tweak the configuration to use https://example.com/nextcloud/? Can it be archived with apache and/or fpm?

Kind regards,

aanno

help wanted

Most helpful comment

see overwrite parameters in reverse proxy configuration doc.

eg. config.php:

<?php
$CONFIG = array (
  'overwriteprotocol' => 'https',
  'overwritehost'     => 'example.com',
  'overwritewebroot'  => 'nextcloud',
);

probably to only change base URL overwritewebroot should be enough.

All 3 comments

Based on your image, this was easy to archive. I modified the project accordingly at https://github.com/aanno/nextcloud-docker . You could also get an docker image at https://hub.docker.com/r/aanno/nextcloud/.

An complete example using that is at https://github.com/aanno/linux-config/tree/master/docker-compose/nextcloud for reference.

there are configs to be set in config/config.php - 'overwritewebroot', 'overwritehost', 'overwriteprotocol'.

see overwrite parameters in reverse proxy configuration doc.

eg. config.php:

<?php
$CONFIG = array (
  'overwriteprotocol' => 'https',
  'overwritehost'     => 'example.com',
  'overwritewebroot'  => 'nextcloud',
);

probably to only change base URL overwritewebroot should be enough.

Was this page helpful?
0 / 5 - 0 ratings