Weird web login issue also preventing app sync

Nextcloud version (eg, 12.0.2): 17.0.1
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.29
PHP version (eg, 7.1): I seem to have 7.1, 7.2, and 7.3 for various modules.

The issue you are facing:

When attempting to log in to my nextcloud server the page doesnt seem to refresh and instead gets stuck in a ‘logging in’ state. I can manually refresh and find I am logged in at that point. Also when attempting to connect the nextcloud app, I am unable to ‘grant’ permissions because clicking the button results in nothing happening.

Is this the first time you’ve seen this error? (Y/N): Yes

I can provide a test login to someone if they think it would be useful to help determine a fix.

The output of your Nextcloud log in Admin > Logging:

There appear to be no errors other than random css issues which dont correspond to my login attempts based on timestamp. EX:

[PHP] Error: unlink(/var/www/nextcloud/data/appdata_ocvrss7fv3cn/css/core/f317-dec2-css-variables.css): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#228

POST /nextcloud/index.php/apps/theming/ajax/updateStylesheet
from 192.168.1.150 by Adubs at 2019-11-18T15:42:04+0000

I believe these errors are unrelated and are simply a theming issue.

config and logs

I can only access these logs from a web VNC interface which doesnt allow me to copy paste. I will update if needed when I get home, or use snips if they are required here

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Some more information about my setup that may be relevant:

I am running reverse proxy via nginx.

Also, I tried clearing browser data and even using another browser thinking it was maybe an issue browser side but no change.

I stumbled upon something with my reverse proxy… If I set it to not force SSL the problem goes away. The downside is I cant get the page to load with https at that point. I think my problem lies in that interaction between the web servers.

Anyone got any ideas? I dont really understand a lot about how this stuff works. I’m thinking maybe theres something in the config of nextcloud or apache I can set to use https?

Update, I added to my config.php

'trusted_proxies' => 
array (
  0 => 'nginxiphere'
),

and that seems to have solved my weird web login issue but now the desktop app doesnt even want to try and connect.

This is what I’m seeing on the desktop app

image

its not exactly a useful error… perhaps someone could inform me of where to look for whats going wrong?

I figured out how to open the log window for the desktop client and saw that its requesting https://nextcloud.mydomain.net/index.php/login/v2which does indeed 404. So my question is, how do I make that redirect properly?

I believe it should be https://nextcloud.mydomain.net/nextcloud/index.php/login/v2

This was working somewhat correctly before but now its not.

Ignore my previous messages. I am in fact too slow to realize I was not adding the /nextcloud/ to the end of my domain. Desktop app is working fine… Its me who is broken.