Comments (7)
I have a proxy setup with nginx, which works fine. How about using the firefox devtools or firebug to debug the issue? The network tab (Netzwerkanalyse, the rightmost tab) in the devtools shows you the requests it sends and the responses from the server.
Server logs might also be helpful.
from ympd.
I would prefere to use Apache, because there is already one running.
When using firefox network analytics, it shows that there is always the same request going out, but is never answered:
GET http://music/
Host: music
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Sec-WebSocket-Version: 13
Origin: http://music
Sec-WebSocket-Key: xI8MWwDX2Y7Buw+KAQBbmQ==
Connection: keep-alive, Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
Is there probably somethign wrong with the proxy? Mpd runs on the same maschine.
from ympd.
Hi,
you need to proxy the websocket request:
http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html
from ympd.
ajs124, could you post your nginx setup? I want to redirect http://mydomain.com:80/ympd to http://localhost:8080 or better https://mydomain.com:443/ympd to http://localhost:8080. Without ssl I do it like this:
location /ympd/ {
rewrite /ympd/(.*) /$1 break;
proxy_pass http://127.0.0.1:8080;
# websocket handling does not help at all
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
But then I experience the problem, that there cannot be established a connection to mpd. Adding the websockets directives to this config did not help yet.
best regards
Henning
from ympd.
I'm also interested in an apache config... This doesn't work:
<IfModule mod_proxy.c>
<IfModule mod_proxy_http.c>
ProxyVia On
ProxyRequests Off
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
ProxyPass "/ws/" "ws://localhost:8080/ws/"
ProxyPreserveHost Off
<Proxy *>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Proxy>
<Location />
Order allow,deny
Allow from all
Require all granted
</Location>
</IfModule>
</IfModule>
from ympd.
Hi,
Below that does work with ympd (and possibly other applications based on WebSockets):
k-rpi is a music server with mpd + ympd, hidden behind NAT
<VirtualHost *:8080>
ServerName k-rpi.hostname
ProxyRequests Off
ProxyPass / ws://k-rpi/
</VirtualHost>
<Proxy http://k-rpi/*>
Order deny,allow
Allow from all
</Proxy>
from ympd.
This also works:
<Location /ympd>
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /ympd/(.) ws://localhost:8082/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /ympd/(.) http://localhost:8082/$1 [P,L]
ProxyPassReverse http://localhost:8082
from ympd.
Related Issues (20)
- Invalid password error
- Header layout issue
- Missing Speaker selection HOT 1
- my playlists keep disapearing when a radio url channel is not working.... HOT 2
- letters not functional at all directory levels HOT 4
- Dirble stuck loading
- Add volume + and - buttons? HOT 2
- cue playlists have not show
- nginx: auto-redirect to http://host/#/0
- Only shows "404 file not found" HOT 1
- Inline <audio> tag HOT 1
- Queue display crashes on long entries
- cmake, Manually-specified variables were not used by the project
- Litte(!?) dependencies HOT 1
- maintenance and next release HOT 2
- Linker error: mpd_client.c.o:(.bss+0x0): multiple definition of `mpd'; CMakeFiles/ympd.dir/src/ympd.c.o:(.bss+0x0): first defined here HOT 6
- Linker error when compiling latest master HOT 5
- Does not properly encode '+' in url through browser HOT 2
- Speeddial Logo?
- Reversal of Play and Pause icons when playing music
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ympd.