Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sending status code possible or redirect to other server?

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
JohnnyOh



Joined: 10 Feb 2009
Posts: 50
Location: Germany

PostPosted: Thu Mar 03, 2011 4:32 pm    Post subject: sending status code possible or redirect to other server? Reply with quote

Hi together,

I have the problem, that a stream was moved to another icecast server, but several listeners have cached my Ip-address and now I need to tell them, that the stream is not available anymore on this server.

Is there a possibility to send a status code 301 for requests on a single stream?

May there be a possibility to move/redirect all requests on this stream to another server?

I am looking forward to receive your ideas.

Kind reagrds

JohnnyOh
_________________
Icecast 2.4.0 (debian)
and
icecast 2.3.2-kh32 (debian)

shoutcast 1.9.5 (debian)
Back to top
View user's profile Send private message
m3gab0y



Joined: 15 Aug 2009
Posts: 47
Location: London, UK

PostPosted: Fri Mar 04, 2011 10:50 am    Post subject: Re: sending status code possible or redirect to other server Reply with quote

JohnnyOh wrote:
Hi together,

I have the problem, that a stream was moved to another icecast server, but several listeners have cached my Ip-address and now I need to tell them, that the stream is not available anymore on this server.

Is there a possibility to send a status code 301 for requests on a single stream?

May there be a possibility to move/redirect all requests on this stream to another server?

I am looking forward to receive your ideas.

Kind reagrds

JohnnyOh


You can start up a web-server suite (example: XAMPP), setup it to start on your server's port (example: 8000 instead of the default 80), and use a simple PHP script to redirect the listeners, located in a folder with the same name as your mountpoint, at the server's web root.

In other words:
1. Install XAMPP
2. Find httpd.conf and find the port 80 setting, change the port to 8000 (or whatever your server's port was)
3. create a simple index.php in C:\xampp\htdocs\mountpointname (or where you've installed XAMPP)
4. open that index.php file and put in this code:

Code:
<?php
header("HTTP/1.1 301 Moved Permanently");
header( 'Location: http://new-server-url.com:8000/mountpoint' );
exit();
?>


5. adjust the above code to your needs
6. copy the .m3u file from your new server, pointing to your mountpoint (you can obtain that file by going to http://your-server.com:8000/mountpoint.m3u) to the XAMPP's webroot/htdocs directory
7. you're done!
Back to top
View user's profile Send private message
JohnnyOh



Joined: 10 Feb 2009
Posts: 50
Location: Germany

PostPosted: Fri Mar 04, 2011 11:10 am    Post subject: Reply with quote

Hi m3gab0y,

thank you for your reply. I already thought of this, but I hoped for a solution in icecast, because I already have installed an apache on this system.

Does anyone have another idea for this "problem"?
_________________
Icecast 2.4.0 (debian)
and
icecast 2.3.2-kh32 (debian)

shoutcast 1.9.5 (debian)
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Mar 04, 2011 2:53 pm    Post subject: Reply with quote

might be worth adding that sort of capability, a mount specific option to redirect to another location eg

<mount>
<mount-name>/old-mountpoint</mount-name>
<redirect>http://......</redirect>
</mount>

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
m3gab0y



Joined: 15 Aug 2009
Posts: 47
Location: London, UK

PostPosted: Sat Mar 05, 2011 9:49 pm    Post subject: Reply with quote

karlH wrote:
might be worth adding that sort of capability, a mount specific option to redirect to another location eg

<mount>
<mount-name>/old-mountpoint</mount-name>
<redirect>http://......</redirect>
</mount>

karl.


it'll be a GREAT idea to add this when the mount is FULL, as currently there is "fallback", it's gonna be just perfect if you add redirect option when the mount is "full" and keep the fallback mount when the source drops.
Back to top
View user's profile Send private message
JohnnyOh



Joined: 10 Feb 2009
Posts: 50
Location: Germany

PostPosted: Mon Mar 07, 2011 10:01 am    Post subject: Reply with quote

Hi Karlh,

thank you for your hint.
I tried to do such a mount, but unfortunately it did not work.
Does it only work in your kh-tree?

I am currently using icecast 2.3.2
_________________
Icecast 2.4.0 (debian)
and
icecast 2.3.2-kh32 (debian)

shoutcast 1.9.5 (debian)
Back to top
View user's profile Send private message
JohnnyOh



Joined: 10 Feb 2009
Posts: 50
Location: Germany

PostPosted: Tue Mar 08, 2011 11:38 am    Post subject: Reply with quote

Hi karlH,

I am sorry for my misunderstanding.
It would be great if this feature will exist in a furture release if Icecast (2.3.3 ?) or in a future kh-tree.

Kind regards

Johnny
_________________
Icecast 2.4.0 (debian)
and
icecast 2.3.2-kh32 (debian)

shoutcast 1.9.5 (debian)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber