Mopidy Discourse

Mopidy Iris trought Proxy/Redirect Apache

Hi,

I want to hit https://www.mopidy.listen in the Browser that the iris interface is coming.

I did a Proxy to 127.0.0.1:8080/iris and is working with SSL but Iris lost all the configurations.
Why? And how i change it that iris hold his configuration?
I can’t connect to MPD or Spotify Extension…
Any ideas?
Greetz

Best off asking on the Iris github issue page for Iris issues.

The other questions you must provide much more detail as this is so vague I can’t begin to help.

Ok, i will give a try…

Ok Setup:

  • Arch Linux which works
  • Apache2 works with other Domain
  • Mopidy (with Iris & Spotify) works under 127.0.0.1:8080/iris

Config of Virtualhost of Proxy/Redirect from www.mopidy.listen to 127.0.0.1:8080/iris

  • Open www.mopidy.listen Open iris URL
  • No configs and No Connection possible to MPD ,local or Spotify

<VirtualHost *:80>
ServerAdmin spotify@xxx.ch
ServerName www.mopidy.listen
#ProxyPreserveHost On

    Redirect "/iris" "https://127.0.0.1:8080/"
    # setup the proxy
    #<Proxy *>
      #  Order allow,deny
        #Allow from all
   # </Proxy>
   # ProxyPass / http://127.0.0.1:8080/iris
   # ProxyPassReverse / http://127.0.0.1:8080/iris
</VirtualHost>

<VirtualHost *:443>
ServerAdmin spotify@xxx.ch
ServerName www.mopidy.listen

Redirect “/iris” “https://127.0.0.1:8080/
#ProxyPreserveHost On

# setup the proxy
#<Proxy *>
#    Order allow,deny
#    Allow from all
#</Proxy>
#ProxyPass / http://127.0.0.1:8080/

#ProxyPassReverse / http://127.0.0.1:8080/

SSLEngine on
SSLCertificateFile "/etc/ssl/certs/www.mopidy.listen.crt"
SSLCertificateKeyFile "/etc/ssl/certs/www.mopidy.listen.key"

So my question are:

  • Are the SSLEngine necesseray
  • What is better redirect ore proxy
  • Why the config is lost of irirs
    -Why i can’t connect to MPD

Thanks for help

Are you somehow trying to connect to MPD (TCP port 6600) via a HTTP(S) proxy configured at www.mopidy.listen? That will not work. Not sure I understand what you are trying to do here.

I found this:

I did exactly like this only changed path and port from 6680 to 8080, but still not working.
I will only can hit https://www.mopidy.listen in Firefox and then should appear http://127.0.0.1:8080/iris

Why should this didn’t work?

I said the MPD part won’t work.

The HTTP part should, but if it isn’t I think asking on the Iris issue tracker is best as it’s their documentation. Sorry,cant be more help.

Ok. i did open a Ticker on github.com iris page.

Maybe I can be clearer, to connect to the MPD frontend you would need a more general TCP proxy. A regular HTTP proxy speaks HTTP protocol which is different to the MPD protocol. https://stackoverflow.com/questions/50518993/apache-proxy-tcp-traffic

iptables -t nat -A PREROUTING -p tcp --dport 6600 -j DNAT --to-destination 127.0.0.1:443
iptables -t nat -A POSTROUTING -j MASQUERADE

It’s all I have to do?