Windows 8, IIS 8.0, Java 7, Tomcat 7 ALL WORKING!!!

Tutorials, tips and tricks.

Moderator: moderators

Windows 8, IIS 8.0, Java 7, Tomcat 7 ALL WORKING!!!

Postby trickydick » Wed Feb 20, 2013 5:12 am

I loved Windows Home Server 2011. But soon found that Microsoft decided NOT to make a the 3rd release. I've read some many forums on what is the best method to upgrade to the next OS without losing all of it features....Windows 8 was the solution. Windows 8 new star menu is something to get use to but it works well and its a lot faster OS. So the key thing is I still want Subsonic installed, but this time I WANT all the latest crap. Here is how I did it:

Install Java 7 JDK
http://download.oracle.com/otn-pub/java/jdk/7u15-b03/jdk-7u15-windows-x64.exe

Subsonic 4.7 WAR
Downloaded file: http://www.subsonic.org/pages/download2.jsp?target=subsonic-4.7-war.zip
unzipped it and rename it to ROOT.war

Tomcat 7.0.37 install
1.) Installed Tomcat
http://apache.spinellicreations.com/tomcat/tomcat-7/v7.0.37/bin/apache-tomcat-7.0.37.exe
install web service to run on port 8080
Start Tomcat

2.) Opened Manager (http://127.0.0.1:8080/manager/html), login
Stopped the Application with path of / and undeployed it
Under WAR file to deploy, browse to the ROOT.war file you renamed earlier. Click Deploy
Wait a few minutes, check on the manager page to see if the application / has started
and also check if C:\subsonic exists

4.) Stopped Tomcat Service

5.) Brows to the subsonic WEB-INF/jsp directory. Open userSetting.jsp with notepad and search for command.new
Change them all to command['new']

6.) Fix CSRF Security Error : Download DWR 3.0R2 release
http://java.net/projects/dwr/downloads/download/DWR_3.x/3.0_RC2/dwr.jar
Put in the subsonic \WEB-INF\lib\
renamed to dwr-3.0.rc2.jar
renamed dwr-3.0.rc1.jar to dwr-3.0.rc1.jar.original

7.) Start Tomcat Service

IIS Setup:
1.) Install IIS from Add and Remove Features on Windows 8

2.) Launch IIS manager, install Web Platform Installer when prompted or go to:
http://www.microsoft.com/web/downloads/platform.aspx
Run web installer and search for ARR, add either ARR 2.5 or ARR 3.0 Beta or download it from here:
http://download.microsoft.com/download/5/5/4/554FBB3E-A572-4642-A97C-5C01EE889254/requestRouter_x64.msi

3.) Create a new web site or use the default Web site.
NOTE: If wanting to host multiple sites, email and I can explain how to do it. If I get enough questions I will post it again.

4.) Add a Application directory in the root of your web page named "Tomcat ROOT", browse to the ROOT of Tomcat 7 webapps
HINT: c:\windows\system32\inetsrv\config\applicationHost.config should have something like this in it:
Code: Select all
<site name="Default Web Site" id="1">
                <application path="/">
                    <virtualDirectory path="/" physicalPath="C:\subsonic\wwwroot" />
                </application>
                <application path="/Tomcat ROOT" applicationPool="DefaultAppPool">
                    <virtualDirectory path="/" physicalPath="D:\Apache Software Foundation\Tomcat 7.0\webapps\ROOT" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:80:www.trickysmedia.com" />
                </bindings>
            </site>


5.) Create a web.config file with notepad and paste this into it:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Tomcat ROOT" patternSyntax="Wildcard">
                    <match url="*" />
                    <action type="Rewrite" url="http://localhost:8080/{R:0}" logRewrittenUrl="true" />
                </rule>
            </rules>
        </rewrite>
        <defaultDocument enabled="true">
            <files>
                <clear />
                <add value="index.jsp" />
                <add value="default.jsp" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>

Save and place it in the root of your web page directory.

6.) Refresh IIS. Open URL Rewrite in IIS to view changes. Should have something in there about "Tomcat ROOT"

7.) run in command prompt:
Code: Select all
%windir%\system32\inetsrv\appcmd set config  -section:system.webServer/proxy /enabled:"True"

to enable the reverse proxy to allow tomcat's url path in IIS

8.) Open the default web site in your browser. subsonic should come up. if not run IISreset then try.

Not all credit goes to me; I found the DWR fix from gekkio from this post: http://forum.subsonic.org/forum/viewtopic.php?f=2&t=8701

Any questions, feel free to ask. I can show you how to move your subsonic database over to if need be.
Tricky
User avatar
trickydick
 
Posts: 147
Joined: Wed Mar 30, 2011 12:43 am
Location: Sanford, North Carolina

Re: Windows 8, IIS 8.0, Java 7, Tomcat 7 ALL WORKING!!!

Postby trickydick » Fri Feb 22, 2013 4:19 am

Nevermind...FAIL

can't seem to get passed the main page. I get a exception errors. like this post: http://forum.subsonic.org/forum/viewtopic.php?f=5&t=8701

Darn
Tricky
User avatar
trickydick
 
Posts: 147
Joined: Wed Mar 30, 2011 12:43 am
Location: Sanford, North Carolina

Re: Windows 8, IIS 8.0, Java 7, Tomcat 7 ALL WORKING!!!

Postby GJ51 » Fri Feb 22, 2013 8:28 am

You might give it a try with Madsonic. Madsonic does run on Tomcat 7. I think SS 4.7 still needs Tomcat 6 to run without errors.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Re: Windows 8, IIS 8.0, Java 7, Tomcat 7 ALL WORKING!!!

Postby mc-kay » Sat Jun 29, 2013 12:56 pm

Does someone managed it to forward with a virtual directory?
Subsonic is running in a VM called "FileServer", and I have another VM called "Webserver" where my domain is landing (homeserver.domain.tdl).
Now I want to access Subsonic via "homeserver.domain.tdl/subsonic".
Here is my current rewrite rule for the virtual directory "subsonic" under the "Default Web Site":
Code: Select all
<rules>
   <rule name="ReverseProxyInboundRule1" stopProcessing="true">
      <match url="(.*)" />
      <action type="Rewrite" url="http://FileServer:4040/{R:1}" />
   </rule>
</rules>


If I now open the URL e.g. on the local webserver I always landing on this URL with a "HTTP Error 404.0 - Not Found": http://localhost/login.view;jsessionid=1re98o0cpsw1f?
If I change the URL to "http://localhost/subsonic/login.view;jsessionid=1re98o0cpsw1f?" I see the login page, but when I click login I get again redirected to "http://localhost/j_acegi_security_check" which obviously not work.

Any hints how to solve this :?:
mc-kay
 
Posts: 1
Joined: Sat Jun 29, 2013 12:34 pm


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 4 guests