server icon indicating copy to clipboard operation
server copied to clipboard

Upgrading to Apache 2.4.26 breaks redirection from /nextcloud to /nextcloud/index.php/login

Open mightyspiky opened this issue 9 years ago • 4 comments

Steps to reproduce

  1. Configure a Nextcloud instance version 12.0.0 available from http://mydomain.tld/nextcloud
  2. Go to http://mydomain.tld/nextcloud which redirects to http://mydomain.tld/nextcloud/index.php/login
  3. Upgrade from Apache 2.4.25 to 2.4.26
  4. Go to http://mydomain.tld/nextcloud which now redirects to http://mydomain.tld/index.php/login (error 404)

Expected behaviour

http://mydomain.tld/nextcloud should keep redirecting to http://mydomain.tld/nextcloud/index.php/login

Actual behaviour

http://mydomain.tld/nextcloud now redirects to http://mydomain.tld/index.php/login (error 404)

Server configuration

Operating system: FreeBSD 10.3

Web server: Apache 2.4.26

Database: MySQL 5.5.54

PHP version: 5.6.30 (using php-fpm)

Nextcloud version: (see Nextcloud admin page) 12.0.0

Updated from an older Nextcloud/ownCloud or fresh install: Updated from 11.0.1

Where did you install Nextcloud from: FreeBSD ports through pkg command

mightyspiky avatar Jun 25 '17 21:06 mightyspiky

Did you try this option in your config/config.php

https://github.com/nextcloud/server/blob/master/config/config.sample.php#L408-L415

and if you want to remove the index.php:

https://github.com/nextcloud/server/blob/master/config/config.sample.php#L408-L415# (update your htaccess after that with the occ command: https://docs.nextcloud.com/server/12/admin_manual/configuration_server/occ_command.html?highlight=occ#maintenance-commands)

tflidd avatar Jun 27 '17 22:06 tflidd

Activating "overwritewebroot" results in "too many redirections" in my web browser when I go to the login page afterwards.

By the way, if I configure nextcloud to be at the root of my webserver (that is http://mydomain.tld/ instead of http://mydomain.tld/nextcloud), It works ok.

Thanks for your help tflidd.

mightyspiky avatar Jun 28 '17 16:06 mightyspiky

I assume, this is a problem with Apache 2.4.26. Please see https://bz.apache.org/bugzilla/show_bug.cgi?id=61202 It also affects other applications if they are not located within document root itself.

Bloodsoul avatar Jun 30 '17 08:06 Bloodsoul

Setting "ProxyFCGIBackendType GENERIC" in my Apache configuration as indicated in your bugzilla link does indeed make it work under Apache 2.4.26. Thank you very much Bloodsoul.

mightyspiky avatar Jun 30 '17 15:06 mightyspiky