App login forces /nextcloud in one GET request, resulting in a 404
Expected behaviour
The app should successfully log in and open the directory screen by respecting the server's configurations.
Actual behaviour
The app makes a GET request with /nextcloud, resulting in a 404 Not Found.
This is what shows up on Apache's acess.log:
1.1.1.1 - - [31/Oct/2020:16:51:34 +0000] "POST /index.php/login HTTP/1.1" 303 6088 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.11"
1.1.1.1 - - [31/Oct/2020:16:51:36 +0000] "GET /nextcloud/index.php/login/flow/grant?clientIdentifier=&stateToken=TOKEN HTTP/1.1" 404 5363 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.11"
Steps to reproduce
- Fill server URL; in my case, cloud.mydomain.com
- Login from new or first account
- Not Found
Reasoning or why should it be changed/implemented?
This wasn't a problem before I got a Wildcard certificate, since I was using domain.com/nextcloud as the URL. However, I'm now using cloud.domain.com, and so I conclude that this is either a bug or hacked code to force it to use /nextcloud since nowhere in my setup (at least to my knowledge) do I have a configuration that uses /nextcloud as rewrite base.
It doesn't happen anywhere else. Desktop browsers (Safari, Firefox and a Chromium-based) and iOS Safari all work as intended.
iOS version
14.1
App version
3.0.11
Server configuration
Running through reverse proxy (Raspberry Pi passing to a WSL setup).
Operating system: WSL Debian
Web server: Apache
Database: MariaDB
PHP version: 7.3
Nextcloud version: 19.0.4.2
I have the same issue, do you have your instance behind a proxy reverse?
iOS app: 3.1.0 Nextcloud: 20.0.4
This problem unable to login with the standar metod. I must to use the legacy loging to use the app.
192.168.1.61 - - [20/Dec/2020:00:22:17 +0100] "POST /nextcloud/login HTTP/1.1" 303 1310 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/3.1.0"
192.168.1.61 - - [20/Dec/2020:00:22:17 +0100] "GET /nextcloud/nextcloud/login/flow/grant?clientIdentifier=&stateToken=P1iwRwLsEVBX4GhKcdBv9rpFJV3C1EVjzCgXqMZ1bfoRxIPZJDdVXtuUPMl8X5Ej HTTP/1.1" 302 914 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/3.1.0"
Today changing this directive I could check it have impact in the URL:
nextcloud/config/config.php
'overwritewebroot' => '/',
It seems when server reply to iOS app, it ignore this directive, duplicating the "/nextcloud" in the URL
Is this ever going to be fixed or will there be some guidance on how to fix it? I've also had this problem for a year now and I'm not sure if your comments @castillo92 are supposed to tell us how to fix the issue or if you were just making an observation as the start of your troubleshooting process.
me guidance
I think it is an issue to be fixed, but changing some parameters in the proxy reverse and nextcloud.conf is enought.
We also need to improve the documentation.
If you need the good config I can share it.
If you need the good config I can share it.
@castillo92 yes, please.
If you need the good config I can share it.
@castillo92 yes, please.
My config.php is:
sudo nano /var/www/nextcloud/config/config.php
<?php
$CONFIG = array (
'passwordsalt' => 'SECRET',
'secret' => 'SECRET',
'trusted_domains' =>
array (
0 => '192.168.1.*',
1 => 'MY_DOMAIN.com',
2 => 'SUB_DOMAIN.MY_DOMAIN.com',
),
'datadirectory' => '/mnt/HDD1/NC_data',
'dbtype' => 'mysql',
'version' => '24.0.2.1',
'dbname' => 'nextcloudDB',
'dbhost' => 'IP_SQL_SERVER:3306',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'SECRET',
'dbpassword' => 'SECRET',
'installed' => true,
'instanceid' => 'SECRET',
'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => 0,
'timeout' => 1.0,
),
'blacklisted_files' =>
array (
0 => '.htaccess',
1 => 'Thumbs.db',
2 => 'thumbs.db',
3 => 'prohib.ido',
),
'loglevel' => 0,
'log_rotate_size' => 3145728,
'mail_smtpmode' => 'smtp',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpsecure' => 'ssl',
'mail_from_address' => 'SECRET',
'mail_domain' => 'gmail.com',
'mail_smtpauth' => 1,
'mail_smtphost' => 'smtp.gmail.com',
'mail_smtpport' => '465',
'mail_smtpname' => '[email protected]',
'mail_smtppassword' => 'SECRET',
'enable_previews' => true,
'preview_max_x' => 1000,
'preview_max_y' => 1000,
'enabledPreviewProviders' =>
array (
0 => 'OC\\Preview\\TXT',
1 => 'OC\\Preview\\MarkDown',
2 => 'OC\\Preview\\PDF',
3 => 'OC\\Preview\\MSOfficeDoc',
4 => 'OC\\Preview\\JPEG',
5 => 'OC\\Preview\\PNG',
6 => 'OC\\Preview\\GIF',
7 => 'OC\\Preview\\BMP',
8 => 'OC\\Preview\\XBitmap',
9 => 'OC\\Preview\\MP3',
10 => 'OC\\Preview\\HEIC',
11 => 'OC\\Preview\\Movie',
12 => 'OC\\Preview\\MKV',
13 => 'OC\\Preview\\MP4',
14 => 'OC\\Preview\\AVI',
15 => 'OC\\Preview\\MOV',
),
'overwrite.cli.url' => 'https://MY_SUBDOMAIN.MY_DOMAIN.com/',
'htaccess.RewriteBase' => '/',
'overwritehost' => 'MY_SUBDOMAIN.MY_DOMAIN.com',
'overwriteprotocol' => 'https',
'overwritewebroot' => '/',
'overwritecondaddr' => '^192.168.2.61$',
'trusted_proxies' =>
array (
0 => '192.168.2.61',
1 => '192.168.5.0/24',
2 => '127.0.0.1',
3 => '::1',
),
'forwarded_for_headers' =>
array (
0 => 'HTTP_X_FORWARDED_FOR',
1 => 'HTTP_X_FORWARDED',
),
'maintenance' => false,
'twofactor_enforced' => 'false',
'twofactor_enforced_groups' =>
array (
),
'twofactor_enforced_excluded_groups' =>
array (
),
'theme' => '',
'default_phone_region' => 'ES',
'app_install_overwrite' =>
array (
0 => 'sharerenamer',
),
);
I have my Nextcloud behaind an Apache Proxy, located in 192.168.2.61
I hope you could find the issue. Take a closer look on special characters: / ^