0
Answered

[Nginx Proxy Manager] wan access / lan access

jorgen 11 months ago updated by 1471 11 months ago 13

I'm stuck.
I was experimenting with my Filerun  (user/group rights) and it went bad so i decided to start again.

I deleted my docker, cleared the database. Restarted and when accessing via LAN it works perfect, i can log in as superuser and start configuring, adding users etc. I can also log in with a user i created and access my files.

When i access via my domain name I can try to login in but before i get logged in I get an error message: (same problem with both users, superuser and my newly created user)

Image 904

My proxy is unchanged, and it worked perfect before the large purge (NginxProxyManager)

Any ideas on what can be wrong? The only changes I have made is remove and create a new database, remove and create a new docker (official docker). (happy that all my files is present)

THe few logs there is says nothing....

Answer

+1
Answer
Answered

So it seems that this is caused by a bug introduced in the latest version of "Nginx Proxy Manager".

The issue is still ongoing here: https://github.com/jc21/nginx-proxy-manager/issues/1717

In the meantime, please follow these steps:

1. Open "system/data/autoconfig.php" in a text editor and, if you see in there the URL of the FileRun installation, make sure it is correct (exactly as in the web browser address bar)

2. Open "customizables/config.php" in a text editor (create if it doesn't exist), and make sure it contains the following two lines (replace "https://your-site/path-to-filerun/" with your own actual URL):

<?php

$config['url']['root'] = 'https://your-site/path-to-filerun/';
$config['url']['detected_root'] = $config['url']['root'];

Make sure you set the exact URL you use in your browser, starting with the right protocol (http/https) and including any custom port numbers if used (https://your-site:1234).

Hopefully there was some kind of tweak i made when installing the first time and that i now has forgotten :-)

It's strange, it worked before the reinstall.

i saw an old thread advising the user to add a line in customize.php that contained the domain name for the server. Maybe that still applies now in the future.... Will test tomorrow🙃 even if I don't have any memory of doing that customization... Well see. I will try your idea first, thanks Vlad

Tried your setting Vlad and it didn't solve the problem.

When I added 

$config['url']['root'] = 'http://your-site/';

it worked fine.

Maybe I added this setting when I did my first install and have forgotten about it.. anyway, thank you for the help.

Just to add to this, i've done the exact same as Jorgen. Reinstall the container, appdata, database and old image all deleted, but had the same issue. Can access via the LAN but not the WAN which was running fine previously.

Tried the above fixes but no luck, any ideas?

When you are trying to login, please use the browser's developer console (F12) and check the network tab, to see what is the URL that the login HTTP request goes to. See if it's the same as the URL you are loading the login form via. If it's not the same, the above config ($config['url']['root']) should work.

Ok, so I changed to:

$config['url']['root'] = 'https://my-FileRun-WAN-URLaddress;

I can then access FileRun externally and register, however when trying to load 'my files' I get:


"Failed to load file list.

Please check your network connection."

If I then log out, I get the same issue as originally reported by Jorgen again

+1
Answer
Answered

So it seems that this is caused by a bug introduced in the latest version of "Nginx Proxy Manager".

The issue is still ongoing here: https://github.com/jc21/nginx-proxy-manager/issues/1717

In the meantime, please follow these steps:

1. Open "system/data/autoconfig.php" in a text editor and, if you see in there the URL of the FileRun installation, make sure it is correct (exactly as in the web browser address bar)

2. Open "customizables/config.php" in a text editor (create if it doesn't exist), and make sure it contains the following two lines (replace "https://your-site/path-to-filerun/" with your own actual URL):

<?php

$config['url']['root'] = 'https://your-site/path-to-filerun/';
$config['url']['detected_root'] = $config['url']['root'];

Make sure you set the exact URL you use in your browser, starting with the right protocol (http/https) and including any custom port numbers if used (https://your-site:1234).

Really appreciate your time and help with this :)

Fix worked for me, all back up and running, thanks

Sorry, back again! I updated the container to the latest version this morning and now can't access Filerun.

I get to the login page via the wan url ok, login and get the error:

"Unexpected server reply. Press "OK" to display it."

Click OK and hangs at:

"Loading..."

This is with the workaround "customizables/config.php" file still in place. Removing the workaround file I get to the login page, sign in and hangs at "Signing in..."

Can you right-click the login page, select "View page source", and look for the detected URL.

And compare that with the URL in your browser:

The URL should be the same with what reads in your browser's address bar.

Thanks,

The address was correct, but with the ports on the end: var URLRoot = 'https://demo.filerun.com:1234';

I noticed that when the container updated the "customizables/config.php" workaround file was removed, so added that back in and now correct, same as the address bar:  var URLRoot = 'https://demo.filerun.com';

Also tried changing "html/system/data/autoconfig.php" to what Jorgen suggested originally.

$config ['url'] ['root'] = 'http://your-site/'; 

But have the same login issue:  "Unexpected server reply. Press "OK" to display it."

A Docker container update should never cause changes inside the FileRun installation folder.

But your information helped me improve this workaround. Here are the steps:

1. Open "system/data/autoconfig.php" in a text editor and, if you see in there the URL of the FileRun installation, make sure it is correct (exactly as in the web browser address bar)

2. Open "customizables/config.php" in a text editor, and make sure it contains the following two lines (replace "https://your-website.com/filerun/" with your own actual URL):

<?php 

$config['url']['root'] = 'https://your-website.com/filerun/';
$config['url']['detected_root'] = $config['url']['root'];

Thanks, back up and running again :)