Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-05-10 17:41:47 +0300
committerLukas Reschke <lukas@owncloud.com>2016-05-10 17:49:36 +0300
commitfefb59e7d0ac0225b270bc0f5fddb6d96dcb5db7 (patch)
tree9375dc8185c200ac912a7016fea248b5a4468d34 /config
parenta3bdcfbb90494b7fefa7c8c39c092a8aef9bfce1 (diff)
Do not automatically try to enable index.php-less URLs
The current logic for mod_rewrite relies on the fact that people have properly configured ownCloud, basically it reads from the `overwrite.cli.ur l` entry and then derives the `RewriteBase` from it. This usually works. However, since the ownCloud packages seem to install themselves at `/owncloud` (because subfolders are cool or so…) _a lot_ of people have just created a new Virtual Host for it or have simply symlinked the path etc. This means that `overwrite.cli.url` is wrong, which fails hard if it is used as RewriteBase since Apache does not know where it should serve files from. In the end the ownCloud instance will not be accessible anymore and users will be frustrated. Also some shared hosters like 1&1 (because using shared hosters is so awesome… ;-)) have somewhat dubious Apache configurations or use versions of mod_rewrite from the mediveal age. (because updating is money or so…) Anyhow. This makes this explicitly an opt-in configuration flag. If `htaccess.RewriteBase` is set then it will configure index.php-less URLs, if admins set that after installation and don't want to wait until the next ownCloud version they can run `occ maintenance:update:htaccess`. For ownCloud 9.0 we also have to add a repair step to make sure that instances that already have a RewriteBase configured continue to use it by copying it into the config file. That way all existing URLs stay valid. That one is not in this PR since this is unneccessary in master. Effectively this reduces another risk of breakage when updating from ownCloud 8 to ownCloud 9. Fixes https://github.com/owncloud/core/issues/24525, https://github.com/owncloud/core/issues/24426 and probably some more.
Diffstat (limited to 'config')
-rw-r--r--config/config.sample.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/config/config.sample.php b/config/config.sample.php
index 4321e5bab83..a0f04c09251 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -362,6 +362,31 @@ $CONFIG = array(
'overwrite.cli.url' => '',
/**
+ * To have clean URLs without `/index.php` this parameter needs to be configured.
+ *
+ * This parameter will be written as "RewriteBase" on update and installation of
+ * ownCloud to your `.htaccess` file. While this value is often simply the URL
+ * path of the ownCloud installation it cannot be set automatically properly in
+ * every scenario and needs thus some manual configuration.
+ *
+ * In a standard Apache setup this usually equals the folder that ownCloud is
+ * accessible at. So if ownCloud is accessible via "https://mycloud.org/owncloud"
+ * the correct value would most likely be "/owncloud". If ownCloud is running
+ * under "https://mycloud.org/" then it would be "/".
+ *
+ * Note that above rule is not valid in every case, there are some rare setup
+ * cases where this may not apply. However, to avoid any update problems this
+ * configuration value is explicitly opt-in.
+ *
+ * After setting this value run `occ maintenance:update:htaccess` and when following
+ * conditions are met ownCloud uses URLs without index.php in it:
+ *
+ * - `mod_rewrite` is installed
+ * - `mod_env` is installed
+ */
+'htaccess.RewriteBase' => '/',
+
+/**
* The URL of your proxy server, for example ``proxy.example.com:8081``.
*/
'proxy' => '',