# Mopidy Iris trought Proxy/Redirect Apache

**URL:** <https://discourse.mopidy.com/t/mopidy-iris-trought-proxy-redirect-apache/4640>\
**Category:** Misc\
**Created:** [January 2, 2021, 11:38am UTC](https://discourse.mopidy.com/t/mopidy-iris-trought-proxy-redirect-apache/4640 "2021-01-02T11:38:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morta](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/morta/32/1869_2.png) [@Morta](https://discourse.mopidy.com/u/Morta)\
**Post date:** [January 2, 2021, 11:38am UTC](https://discourse.mopidy.com/t/mopidy-iris-trought-proxy-redirect-apache/4640/1 "2021-01-02T11:38:11Z")

</div>

Hi,

I want to hit [https://www.mopidy.listen](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

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [January 2, 2021, 11:56am UTC](https://discourse.mopidy.com/t/mopidy-iris-trought-proxy-redirect-apache/4640/2 "2021-01-02T11:56:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Morta](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/morta/32/1869_2.png) [@Morta](https://discourse.mopidy.com/u/Morta)\
**Post date:** [January 2, 2021, 5:01pm UTC](https://discourse.mopidy.com/t/mopidy-iris-trought-proxy-redirect-apache/4640/3 "2021-01-02T17:01:56Z")

</div>

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/](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/](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

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [January 2, 2021, 5:49pm UTC](https://discourse.mopidy.com/t/mopidy-iris-trought-proxy-redirect-apache/4640/4 "2021-01-02T17:49:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Morta](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/morta/32/1869_2.png) [@Morta](https://discourse.mopidy.com/u/Morta)\
**Post date:** [January 2, 2021, 5:58pm UTC](https://discourse.mopidy.com/t/mopidy-iris-trought-proxy-redirect-apache/4640/5 "2021-01-02T17:58:47Z")

</div>

I found this:

> **[jaedb/Iris - 
Apache](https://github.com/jaedb/Iris/wiki/Advanced#apache)**
>
> Advanced

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](https://www.mopidy.listen) in Firefox and then should appear [http://127.0.0.1:8080/iris](http://127.0.0.1:8080/iris)

Why should this didn’t work?

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [January 2, 2021, 8:48pm UTC](https://discourse.mopidy.com/t/mopidy-iris-trought-proxy-redirect-apache/4640/6 "2021-01-02T20:48:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Morta](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/morta/32/1869_2.png) [@Morta](https://discourse.mopidy.com/u/Morta)\
**Post date:** [January 2, 2021, 9:05pm UTC](https://discourse.mopidy.com/t/mopidy-iris-trought-proxy-redirect-apache/4640/7 "2021-01-02T21:05:09Z")

</div>

Ok. i did open a Ticker on [github.com](http://github.com) iris page.

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [January 2, 2021, 9:35pm UTC](https://discourse.mopidy.com/t/mopidy-iris-trought-proxy-redirect-apache/4640/8 "2021-01-02T21:35:12Z")

</div>

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](https://stackoverflow.com/questions/50518993/apache-proxy-tcp-traffic)

---

<div class="post-metadata">

**Author:** ![Morta](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/morta/32/1869_2.png) [@Morta](https://discourse.mopidy.com/u/Morta)\
**Post date:** [January 2, 2021, 10:10pm UTC](https://discourse.mopidy.com/t/mopidy-iris-trought-proxy-redirect-apache/4640/9 "2021-01-02T22:10:00Z")

</div>

```auto
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?

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/system/32/1_2.png) [@system](https://discourse.mopidy.com/u/system)\
**Post date:** [July 4, 2021, 10:10am UTC](https://discourse.mopidy.com/t/mopidy-iris-trought-proxy-redirect-apache/4640/10 "2021-07-04T10:10:05Z")

</div>

Closed on July 4, 2021, 10:10am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
