Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

htaccess.RewriteBase in config.php is not changing behaviour of nextcloud #2373

Closed
michaelachmann opened this issue Nov 28, 2016 · 3 comments

Comments

@michaelachmann
Copy link

Steps to reproduce

  1. Upgrade from OwnCloud 9 to Nextcloud 10.0.1 (remove files from owncloud directory, expect config and data dir)
  2. Check config.php for the line 'htaccess.RewriteBase' => '/'
  3. Run occ maintenance:update:htaccess
  4. Try accessing nextcloud installation without /index.php/ in the URL or try using shared links from the owncloud installation

Expected behaviour

Nextcloud should accept the old links (without index.php) and use mydomain.tld/apps/files instead of mydomain.tld/index.php/apps/files

Actual behaviour

Although the .htaccess file is altered by occ the index.php part stays in the URL, links without index.php are getting a 404 error.

This problem is also being discussed here: https://help.nextcloud.com/t/apache-rewrite-to-remove-index-php/658
Nevertheless I am not experiencing this problem due to the use of php-fpm or mod_fastcgi, which means the fixes suggestes in the thread are not working.

Server configuration

Operating system:
Raspbian GNU/Linux 8 (jessie)

Web server:
Apache 2.4.10

Database:
mysql 14.14

PHP version:
PHP 5.6.27

Nextcloud version: (see Nextcloud admin page)
10.0.1

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from:

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - activity: 2.3.2
  - comments: 1.0.0
  - dav: 1.0.1
  - documents: 0.13.1
  - encryption: 1.3.1
  - federatedfilesharing: 1.0.1
  - federation: 1.0.1
  - files: 1.5.2
  - files_external: 1.0.2
  - files_pdfviewer: 0.8.1
  - files_sharing: 1.0.0
  - files_texteditor: 2.1
  - files_trashbin: 1.0.0
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 15.0.0
  - notifications: 0.3.0
  - ownnote: 1.08
  - password_policy: 1.0.0
  - provisioning_api: 1.0.0
  - serverinfo: 1.1.1
  - survey_client: 0.1.5
  - systemtags: 1.0.2
  - tasks: 0.9.3
  - templateeditor: 0.1
  - theming: 1.0.1
  - updatenotification: 1.0.1
  - workflowengine: 1.0.1
Disabled:
  - admin_audit
  - audioplayer
  - external
  - files_accesscontrol
  - files_automatedtagging
  - files_retention
  - user_external
  - user_ldap
  - user_saml

The content of config/config.php:

Config report
{
    "system": {
        "updatechecker": false,
        "instanceid": "....",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "owncloud.domain.de"
        ],
        "datadirectory": "\/media\/owncloud",
        "overwrite.cli.url": "https:\/\/owncloud.domain.de",
        "htaccess.RewriteBase": "\/",
        "overwritewebroot": "\/",
        "overwriteprotocol": "https",
        "dbtype": "mysql",
        "version": "9.1.1.5",
        "logtimezone": "Europe\/Berlin",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_smtphost": "mail.domain.de",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "no-reply",
        "mail_domain": "domain.de",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 0,
        "theme": ""
    }
}

@LukasReschke
Copy link
Member

Please post your complete .htaccess file.

@MorrisJobke
Copy link
Member

If you are using Apache you need to set the AllowOverwrite attribute for the Nextcloud folder to All - see https://docs.nextcloud.com/server/10/admin_manual/installation/source_installation.html#apache-web-server-configuration

This allows Apache to load the .htaccess file and overwrite the settings from the apache config with the values in this file.

@MorrisJobke
Copy link
Member

Please reopen if the AllowOverwrite is properly set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants