subdomain with IIS 7

Need help? Post your questions here.

Moderator: moderators

subdomain with IIS 7

Postby naltimari » Fri Jul 15, 2011 7:02 pm

Hello all. I've had subsonic up and running for a couple months now. I am running on server 2008 x64. I just upgraded to the 4.5 beta, and everything still works fantastic... however there has been one minor thing I can't figure out.

I have had subsonic running on port 8080, since my web server is already using port 80 to serve web pages. I host a few different domains and sub domains, and would like to give subsonic it's own sub domain or domain. Does anyone have any experience doing this, or can someone perhaps point me to a solution?

I am using the windows install build of subsonic. Do I need to start working with a stand-alone build or something? Is there a simple thins I am missing in IIS7?

In case anyone is wonderig, I would like this to run on port 80, because I access my media at a few locations with firewalls that block nearly everything except port 80.

Any help is appreciated, thank you!

~Nathan
naltimari
 
Posts: 2
Joined: Fri Jul 15, 2011 6:44 pm

Postby Qbix » Sat Jul 16, 2011 9:56 am

You can just create a new subdomain and point the 'home directory' in IIS7 to *default*: C :\subsonic\jetty\2289\webapp

That should work :)
Cheers,
Image
------------------
14.985 artiesten
10.798 albums
90.526 nummers
822,06 GB (~ 12.770 uur)
------------------------------
Qbix
 
Posts: 97
Joined: Thu Jun 30, 2011 1:36 pm
Location: Netherlands

no luck yet

Postby naltimari » Sat Jul 16, 2011 10:24 pm

Thank you Qbix for the suggestion. I tried it, the main file in that directory (index.html) redirects to index.view, which my server gives the error "file or directory not found"...

I'm not certain, but is this because IIS cannot run .jsp pages? I haven't looked extensively, but it appears I may have to install Tomcat, some ISAPI_redirect, etc.... am I on the right track, or am I just very confused?

or did I just miss something simple?

Thanks for the help,

~Nathan
naltimari
 
Posts: 2
Joined: Fri Jul 15, 2011 6:44 pm

Postby jollygoodlad » Wed Jul 20, 2011 6:22 am

I've only gotten it to work by setting it up as a subdomain that redirects to domain.xxx:8080. Of course, after the redirect it shows as domain.xxx:8080, but it does make it easier for friends to get to.

From my understanding, when you install subsonic, you also install a webserver that runs in parallel to IIS. Having two webservers running on the same port on the same machine causes a conflict - in which I believe that IIS is given a higher priority? A direct subdomain would theoretically work if the box had just the subsonic install.

Sorry, take my "advice" with a grain of salt.. it's been a while since I've installed subsonic and battled with the subdomain issue. :P
jollygoodlad
 
Posts: 1
Joined: Wed Jul 20, 2011 6:18 am

solution

Postby trickydick » Sun Jul 31, 2011 10:44 pm

Uses IIS to host subsonic. That way you can run all yours sites on port 80 (with headers). Thats what i do. I'm hosting a few ASP sites while hosting the Subsonci JSP site on my Windows Server 2008 R2 IIS Web Server. I'm using IIS to redirect to Tomcat on port 80.

On google, search for "IIS 7.5 Redirect to Tomcat"

Her are some links:
http://jhmeier.wordpress.com/2009/10/16/acitvating-the-isapi-redirect-for-tomcat-under-iis-7-5-w2k8-r2-64-bit/ or http://ashrafhossain.wordpress.com/2010/09/20/how-to-configure-iis-7-and-tomcat-redirection-on-windows-server-2008-64-bit/

it uses a simple ISAPI Redirect DLL and a few extra confiurations in Tomcat and your users will use IIS as the "frontend".

The only difference I see is that when a user plays a song it waits for the song to be cached before playing, before on Tomcat it would play whlie caching. I'm sure I'm mising a setting though.
Tricky
User avatar
trickydick
 
Posts: 147
Joined: Wed Mar 30, 2011 12:43 am
Location: Sanford, North Carolina

Postby csobsidian » Mon Aug 08, 2011 2:19 am

@trickydick - Did you find a solution to your caching issue?
csobsidian
 
Posts: 22
Joined: Mon Aug 08, 2011 2:07 am

nothing

Postby trickydick » Tue Aug 09, 2011 1:52 am

Nope; I found nothing on the web about caching or media streaming fro IIS redirecting to Tomcat. I thought installing the streaming media plugin for IIS would help and still nothing. Subsonic uses ehcache (http://ehcache.org/) for caching but I don't know if that has anything to do with streaming.

I've been reading about another solution for redirecting. I tried it last weekend and couldn't get it to work, still looking at it though. in the mean time i moved back to tomcat.

New solution:
BonCodeAJP13
http://tomcatiis.riaforge.org/

This seems to be a better solution, if i can get it to work. i may have to rebuild my IIS.
Tricky
User avatar
trickydick
 
Posts: 147
Joined: Wed Mar 30, 2011 12:43 am
Location: Sanford, North Carolina

Postby csobsidian » Wed Aug 10, 2011 12:32 am

@naltimari - Well I have successfully gotten my installation to work with IIS at the root level. I have also left the default Web Access on IIS intact. If you can get IIS to work subsonic you've already done the hardest parts:

1. I created an empty subsonic directory in my C:\inetpub directory.
2. I created a new website in IIS called Subsonic and pointed it to the empty directory in step 1. I told it to utilize my default IPv4 adapter and to use a Fully Qualified Domain Name of "<blah>.dyndns.org" replacing <blah> with my actual dynamic dns FQDN.
3. I setup Tomcat and Subsonic on port 8080 and verified that that all worked correctly. (Look elsewhere for these steps, you'll find them.)
4. When setting up the isapi_redirect.dll, as shown elsewhere, instead of using the default website, I used the Subsonic website in IIS.
5. I verified that subsonic worked in IIS via http://<blah>.dyndns.org/subsonic/
6. Now to make it the root directory instead of the /subsonic/ directory I went to tomcat and renamed my ROOT directory in the tomcat webapps folder 'ROOT original' to preserve it as a backup.
7. In the same directory I changed my subsonic folder to 'ROOT' and subsonic.war to 'ROOT.war'. I restarted Tomcat.
8. I then verified that subsonic was my root java application in tomcat by browsing to http://localhost:8080/
9. Having verified that, I made the following change to my uriworkermap.properties file. I changed "/subsonic/*=wlb" to "/*=wlb" and restarted IIS.
10. I verified that subsonic was now available at http://<blah>.dyndns.org

Presto! I also have an internal domain I use, in order to add that to the subsonic web site all I had to do was add another binding for subsonic.<internal.domain> and create an entry for it in the DNS table. Because I did not mess with the default web site any other request to the server other than <blah>.dyndns.org or subsonic.<internal.domain> will be served as normal.

@trickydick - I then dug around to find your issue with caching and indeed I have found it. I only have this issue when I'm streaming files that need to be transcoded through IIS. Files that need to be transcoded work just fine through the tomcat interface on port 8080. Additionally, files that dont need transcoding play just fine through IIS. this leads me to think that there is something going on with the isapi_redirect.dll where it is waiting to get the final chunks of stdout from lame (via tomcat). I have seen on the tomcat website that there is a compiler option for chunking. I think this may be our answer. Thoughts?
csobsidian
 
Posts: 22
Joined: Mon Aug 08, 2011 2:07 am

Postby trickydick » Wed Aug 10, 2011 3:26 am

those are some excellent instructions. I pretty much did it the same way

I've been thinking of a few way to get the streaming to work. The transcoding issue makes sense as all my users streaming the files at a lower bitrate (96kbs) to save bandwith. I've been reading about ffmpeg transcodings (http://www.ffmpeg.org/ffmpeg-doc.html#SEC42) and thought of ienabling RTMP on my server and then looking to see if I can modifiy the music links to change from http to rtmp://, or better yet change all my transcoding settings to something like this:

Code: Select all
ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream


Or maybe just install a media encoder adpater to IIS....
The biggest thing is to understand how the http request comes into the web server or into IIS to Tomcat. I'm not sure I do.

Or maybe there is another way to transcode instead of using ffmpeg or lame. Somthting a little more universal encoder that works with iis.

Otherwise i don't know. I disabled to IIS and kept tomcat on port 80 for now...but it would be awesome to get all my sites working again.
Tricky
User avatar
trickydick
 
Posts: 147
Joined: Wed Mar 30, 2011 12:43 am
Location: Sanford, North Carolina

Postby csobsidian » Thu Aug 11, 2011 5:23 am

@trickydick I posted a tutorial using an alternative to the jakarta isapi dll which can be found at http://forum.subsonic.org/forum/viewtopic.php?t=7566

I have had no streaming issues using this alternative method. I also started a new thread secifically for the issues with the isapi_redirect.dll at http://forum.subsonic.org/forum/viewtopic.php?t=7563
csobsidian
 
Posts: 22
Joined: Mon Aug 08, 2011 2:07 am

OMG

Postby trickydick » Thu Aug 11, 2011 2:12 pm

OMG it worked! Alot better than isapi_redirect. Thank you
Tricky
User avatar
trickydick
 
Posts: 147
Joined: Wed Mar 30, 2011 12:43 am
Location: Sanford, North Carolina


Return to Help

Who is online

Users browsing this forum: No registered users and 13 guests