Owncloud stoped working after update

This should be the virtual host for apache that is used by ownCloud (from the docker container)

<VirtualHost *:${APACHE_LISTEN}>
  ServerAdmin ${APACHE_SERVER_ADMIN}
  DocumentRoot ${APACHE_DOCUMENT_ROOT}

  ErrorLog ${APACHE_ERROR_LOG}
  CustomLog ${APACHE_ACCESS_LOG} ${APACHE_LOG_FORMAT}

  <Directory ${APACHE_DOCUMENT_ROOT}>
    AllowOverride All
    Options -Indexes +FollowSymlinks
  </Directory>
</VirtualHost>

Relevant environment variables:

APACHE_ACCESS_FILE_NAME=.htaccess
APACHE_ACCESS_LOG=/dev/stdout
APACHE_ADD_DEFAULT_CHARSET=UTF-8
APACHE_DOCUMENT_ROOT=/var/www/owncloud
APACHE_ENTRYPOINT_INITIALIZED=true
APACHE_ERROR_LOG=/dev/stderr
APACHE_HOSTNAME_LOOKUPS=Off
APACHE_KEEP_ALIVE=On
APACHE_KEEP_ALIVE_TIMEOUT=5
APACHE_LISTEN=8080
APACHE_LOCK_DIR=/var/lock/apache2
APACHE_LOG_FORMAT=combined
APACHE_LOG_LEVEL=notice
APACHE_MAX_KEEP_ALIVE_REQUESTS=100
APACHE_PID_FILE=/var/run/apache2/apache2.pid
APACHE_RUN_DIR=/var/run/apache2
APACHE_RUN_GROUP=www-data
APACHE_RUN_USER=www-data
APACHE_SERVER_ADMIN=webmaster@localhost
APACHE_SERVER_NAME=localhost
APACHE_SERVER_SIGNATURE=Off
APACHE_SERVER_TOKENS=Prod
APACHE_TIMEOUT=300
APACHE_TRACE_ENABLE=Off

That should work. Most of the stuff should be handled by ownCloud through its own .htaccess file.

I don’t have a debian machine to check, but if the problem happens only with debian (at least so far) maybe someone could upload the virtual host configuration to have a look at it.

2 Likes

I have been running my ownCloud on Apache on Debian Stable installed from the official ownCloud .deb package for approximately a decade. With one exception quite some years ago. I have been upgrading the same installation (and the operating system) in place. I experienced no disruptions during this recent upgrade. I don’t share this to discount the experience of others in this topic, but rather to offer my installation as a reference for comparison if it would help.

Our installation is among those that tripped over this recent install AND that is once again running after reverting to .htaccess from 10.11. It really does seem that a better check needs to be part of the upgrade.

1 Like

Same here.
Updated two installations, both were completely broken after the update.
Restoring the previous htaccess-file did the trick.

You don’t have to revert the security changes, but I expect you to correct them!

I’m still not 100% sure how this issue is caused (how to reproduce it), but perhaps it has something to do with rewrite base or subfolder installations:

However there is an occ command to update the .htaccess file. Perhaps that would regenerate the correct one for installations in subfolders / using (or not) a rewrite base:

Perhaps that would be worth a shot for people experiencing the issue? Please take another backup of the .htaccess before running the command, and be prepared that in a fixed installation, it might undo the fix.

2 Likes

Hey,

i think this has been solved now with the most recent ownCloud version 10.12.1:

Bugfix - Add rewrite base to .htaccess: #40697

In previous core versions the rewrite base config.php option was not added to the generated .htaccess file. The use of a more hardened .htaccess file in version 10.12.0 (being introduced by tweak rewrite conditions in htaccess by C0rby · Pull Request #40584 · owncloud/core · GitHub) caused the files view in the web UI to be empty in URL via subfolder plus index.php-less setups. Additionally, the desktop app was not be able to sync and an error 405 (Method not allowed) was returned. Rewrite base is now correctly added to the .htaccess file.

[QA] hardened .htaccess breaks index.php-less setup when ownCloud URL has a subfolder · Issue #40696 · owncloud/core · GitHub

Add rewrite base to generated .htaccess rules by IljaN · Pull Request #40697 · owncloud/core · GitHub

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.