Code Monkey home page Code Monkey logo

Comments (5)

dkarnout avatar dkarnout commented on July 18, 2024

UPDATE if it helps:
The following does not a 'Server Error' anymore, but shows 'Internet radio' and does not show 'Search by genre', etc:
I believe my error is at X-Forwarded-For...

<VirtualHost _default_:80>
  ServerName marantz.vtuner.com
  ServerAlias radiomarantz.com
  <Location />
    ProxyPreserveHost On
    RequestHeader set X-Real-IP %{REMOTE_ADDR}s
    RequestHeader set X-Forwarded-For %{REMOTE_ADDR}s
    RequestHeader set X-Forwarded-Proto %{REQUEST_SCHEME}s
 #          proxy_redirect  off;
 #          proxy_set_header Host $host;
 #          proxy_set_header X-Real-IP $remote_addr;
 #          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 #          proxy_set_header X-Forwarded-Proto $scheme;
    ProxyPass http://127.0.0.1:8010/
    ProxyPassReverse http://127.0.0.1:8010/
  </Location>
  ErrorLog ${APACHE_LOG_DIR}/error.vtuner.log
  CustomLog ${APACHE_LOG_DIR}/access.vtuner.log combined
</VirtualHost>

from ycast.

SpeedyGoneZales avatar SpeedyGoneZales commented on July 18, 2024

It's not directly related to the apache2 config, but when I brought up a virtual machine on CentOs 9 recently, I ran into trouble with running yCast on the local loopback interface and firewalld.
The workaround was to not tie yCast to the localhost interface, and use firewalld to redirect port 80 like so:

yCast

/usr/bin/python3 -m ycast -p 8010 -c /etc/ycast/stations.yaml -d   

(note how -l 127.0.0.1 is absent from the above config).

firewalld

sudo firewall-cmd --zone=public --add-forward-port=port=80:proto=tcp:toport=8010   
sudo firewall-cmd --runtime-to-permanent

This is a single-purpose set-up, so I don't need to worry much about running a webserver or anything else.

from ycast.

dkarnout avatar dkarnout commented on July 18, 2024

Thanks for your idea 👍 , just implemented it with iptables (only for my LAN, because I have external http requests):
sudo iptables -t nat -A PREROUTING -s 192.168.1.1/24 -p tcp --dport 80 -j REDIRECT --to-port 8010
Everything works ok from my home LAN devices, except from my NA7004 😞 which asks me to visit radiomarantz.com...
So I believe that it looks directly into an IP and not into a domain.
Any other device from my LAN is redirected correctly to myhomeserver/ycast from:

radiomarantz.com
*.vtuner.com

Someday I may try to sniff NA7004's requests and keep up inform any interested.

from ycast.

SpeedyGoneZales avatar SpeedyGoneZales commented on July 18, 2024

@dkarnout, I'm glad it helped you. An http server is of course a much better solution, but I have only a single device, so I guess for that use case it's ok.

I don't have an NA7004, but I'd be surprised if it's a different logic to mine (MCR610); is the DNS server set correctly on your NA7004?
I'm only redirecting *.vtuner.com and vtuner.com, which I'm doing directly on my router, and the MCR610 receives the router's IP address as DNS server via DHCP. The former should cover denon.vtuner.com, which I believe is what Marantz uses.
My MCR610 does occasionally lose network connectivity completely, I am only able to restore it by resetting it completely in this case (unplug the power, and hold the <M-DAX> and <DISPLAY> buttons while plugging it back in). This means losing all settings unfortunately...

from ycast.

dkarnout avatar dkarnout commented on July 18, 2024

@SpeedyGoneZales I managed it with your help (again)! The problem was NA7004's DNS setting as you said.
While had already put my router IP (192.168.1.1) at:
Menu -> Network -> Connection -> Primary DNS, the value does not store until you follow after that
Menu -> Network -> Connection -> Connection, and that was my problem.

So I can confirm yCast works flawlessly for NA7004 with mandatory both local DNS records:
denon.vtuner.com and
denon2.vtuner.com.
Thank you again and do have nice holidays!

from ycast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.