[Solved] [6.0.7110] URL settings ignored in properties-file?

Mission accomplished!
Heruwar
Posts: 10
Joined: 09 May 2014, 21:37
Has thanked: 3 times
Been thanked: 7 times

[Solved] [6.0.7110] URL settings ignored in properties-file?

Unread post by Heruwar »

:geek: Background: I've been running Madsonic 5.2.5420 for a while with the following URL redirection settings:

Code: Select all

UrlRedirectContextPath=madsonic
UrlRedirectionEnabled=false
MadsonicUrl=https\://mydomain.com/madsonic
Together with appropriate apache reverse proxy settings so that I can access my madsonic server on https://mydomain.com/madsonic, and it has been working great for a long time.

I just checked out version 6.0.7110 and tried to migrate these settings, but keep getting redirected to http://127.0.0.1:4040/login.view whenever I access the https://mydomain.com/madsonic URL. With version 6.0 I'm using these properties:

Code: Select all

UrlRedirectContextPath=madsonic
UrlRedirectionEnabled=false
UrlRedirectCustomUrl=https\://mydomain.com/madsonic
UrlRedirectType=CUSTOM
The "UrlRedirectCustomUrl" and "UrlRedirectType" settings seem to be new in 6.0 and created from the Web GUI under Settings > Network, at least my old config didn't have these listed. I also tried adding the old "MadsonicUrl=https\://mydomain.com/madsonic" option, but that didnt seem to make any difference either.

Has anyone managed to get this working in versions after 6.0?

It feels like I've tried all variations of the new and old options to no avail. Any tips on what I'm doing wrong here? :geek:
Last edited by Heruwar on 26 Aug 2015, 16:16, edited 1 time in total.
These users thanked the author Heruwar for the post:
Madsonic
Rating: 7.69%
Heruwar
Posts: 10
Joined: 09 May 2014, 21:37
Has thanked: 3 times
Been thanked: 7 times

Re: [6.0.7110] URL settings ignored in properties-file?

Unread post by Heruwar »

Some additional information:

When I try to use the Web GUI and go to Settings > Network and try the "Use custom URL" option I get this SSL error message:

Image

Also checked with some SSL cert validation tools, and can't find any errors with my certificate. None of the madsonic or apache logs show any errors either.
These users thanked the author Heruwar for the post:
Madsonic
Rating: 7.69%
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: [6.0.7110] URL settings ignored in properties-file?

Unread post by Madsonic »

Hi there,

Since Build 7110 the correct settings for custom sharing are:

Code: Select all

UrlRedirectionEnabled=true
UrlRedirectCustomUrl=http\://localhost\:4040
UrlRedirectType=CUSTOM
You can ignore the results from the Madsonic backend in your frontend,
without your certificate the backend can't connect, it's only for testing purposes.

Best regards
These users thanked the author Madsonic for the post:
Heruwar
Rating: 7.69%
Heruwar
Posts: 10
Joined: 09 May 2014, 21:37
Has thanked: 3 times
Been thanked: 7 times

Re: [6.0.7110] URL settings ignored in properties-file?

Unread post by Heruwar »

Thanks for the feedback.

I just did some more research, and the root cause for my problem is that I can't get madsonic to become available at http://localhost:4040/madsonic like before.

Is the "UrlRedirectContextPath=madsonic" option renamed, or no longer available?
Is it possible to get the same effect some other way?

I also tried with these settings but it didn't seem to make any difference:

Code: Select all

UrlRedirectionEnabled=true
UrlRedirectCustomUrl=http\://localhost\:4040/madsonic
UrlRedirectType=CUSTOM
These users thanked the author Heruwar for the post:
Madsonic
Rating: 7.69%
Heruwar
Posts: 10
Joined: 09 May 2014, 21:37
Has thanked: 3 times
Been thanked: 7 times

Re: [6.0.7110] URL settings ignored in properties-file?

Unread post by Heruwar »

Apparantly the command line option to madsonic.sh still works, even if the option in the properties-file doesn't.

So setting MADSONIC_ARGS="--context-path=/madsonic" in /etc/default/madsonic solves the problem for me.
These users thanked the author Heruwar for the post:
Madsonic
Rating: 7.69%
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: [6.0.7110] URL settings ignored in properties-file?

Unread post by Madsonic »


for clarification:


This feature never worked like this!

UrlRedirectContextPath is for the routing to your name context Path --> username.madsonic.org

but the contextPath for the servlet can only be set as you mentioned in your post before

Code: Select all

-Dmadsonic.contextPath=/madsonic
best regards
recky
Posts: 2
Joined: 12 May 2016, 07:12
Has thanked: 0
Been thanked: 0

Re: [Solved] [6.0.7110] URL settings ignored in properties-f

Unread post by recky »

Hi guys,

sorry to be a bother, but could you sum up again how to do this exactly? I'm using 6.1 of DSM 6.

I use a DSM6 native reverse proxy rule which is configured to https://madsonic.domain.com. But I too get redirected to https://madsonic.domain.com/login.view and then a 404 not found page.

thanks so much in advance!
Post Reply