FAQ  •  Register  •  Login

[Solved] Serviio console in a virtual host via a proxy

<<

THSA

Serviio newbie

Posts: 14

Joined: Sat Mar 30, 2013 9:19 pm

Post Tue Jan 19, 2016 11:18 pm

[Solved] Serviio console in a virtual host via a proxy

Hi everyone,

I just upgraded from 1.4 to 1.6 and would like to use the console (not the mediabrowser) via a proxy (Apache) like I do with some other apps (webmin or cups for instance) on my headless server. I tried

  Code:
<Location /serviio/>
        ProxyPreserveHost On
        ProxyPass http://localhost:23423/console
        ProxyPassReverse http://localhost:23423/console
</Location>


but I end up on a "Not found" blank page at https://myhost.mydomain.tld/console/ whereas it should be https://myhost.mydomain.tld/serviio/ I believe.
I tried to play with some ProxyHTMLURLMap rules with no luck so far.

http://myhost:23423/console is working perfectly.

Can someone please help me to solve this ? Thank you in advance.

THSA
Last edited by THSA on Sun Apr 03, 2016 11:37 am, edited 1 time in total.
<<

RaNd

Serviio newbie

Posts: 9

Joined: Tue Feb 02, 2016 2:44 pm

Post Tue Feb 02, 2016 2:59 pm

Re: Serviio console in a virtual host via a proxy

I used something like this

R
  Code:
ewriteCond %{HTTP_REFERER} domain.com/serviio/
RewriteCond %{REQUEST_URI} !^/serviio/
RewriteRule ^/(.*)$ https://domain.com/serviio/$1 [L,R=permanent]
RewriteCond %{REQUEST_URI} ^/serviio/
RewriteRule ^/serviio/(.*)$ http://localhost:23423/console/$1 [L,P]

<Location /serviio/>
ProxyPass  http://localhost:23423/console/
ProxyPassReverse   http://localhost:23423/console/
    ProxyPassReverseCookiePath / /serviio/
    Substitute s?/console?/serviio/console?n
    Substitute s?/rest?/serviio/console/rest?n
    SetOutputFilter INFLATE;SUBSTITUTE;DEFLATE
    RequestHeader unset Accept-Encoding
</Location>


I get the console but it pop-up an error that cannot connect to the server.

Maybe iI miss something for the substitute, like Substitute s?/rest?/serviio/console/rest?n
<<

RaNd

Serviio newbie

Posts: 9

Joined: Tue Feb 02, 2016 2:44 pm

Post Tue Feb 02, 2016 3:50 pm

Re: Serviio console in a virtual host via a proxy

I got it working with this:

  Code:
<Location /serviio/>
    ProxyPass  http://localhost:23423/
    ProxyPassReverse   http://localhost:23423/
        ProxyPassReverseCookiePath / /serviio/
        Substitute s?/console?/serviio/console?n
        Substitute s?/rest?/serviio/rest?n
        SetOutputFilter INFLATE;SUBSTITUTE;DEFLATE
        RequestHeader unset Accept-Encoding
    </Location>


http[s]://mydomain.com/serviio/console

Afterwards you can add

  Code:
AllowOverride None
            AuthType Basic
            AuthName "Authentication Required"
            AuthUserFile "/var/www/.htpasswd"
            Require valid-user
            Allow from 192.168.1.0/24
            Satisfy any
            Order allow,deny
<<

THSA

Serviio newbie

Posts: 14

Joined: Sat Mar 30, 2013 9:19 pm

Post Sun Apr 03, 2016 11:33 am

Re: Serviio console in a virtual host via a proxy

Thanks RaNd, seems to be OK now ! :) I hope the console will evolve in a future version so that we can use a simpler proxy setup (playing with substitute rules is not nice).

Bests,

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 80 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.