Reputation: 1
I am currently hosting a rails server. When I go to http://localhost:3000 I can view the application and everything.
Now I am trying to set it up as a website that can be viewed from the outside world using IIS. I dragged it into c:\inetpub\wwwroot but when Iright click on browse in IIS it tells me that "The website declined to show this webpage." Note that I do allow anonymous access.
Is there some other step to setting up a rails application this way? The only experience I have is hosting an asp.net application.
Upvotes: 0
Views: 1261
Reputation: 1096
You can use HttpPlatformHandler
install it with Web Platform Installer and add web.config in root of rails application directory.
input this in web.config
<configuration>
<system.webServer>
<handlers>
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" requireAccess="Script" />
</handlers>
<httpPlatform stdoutLogEnabled="true" stdoutLogFile="rails.log" startupTimeLimit="20" processPath="c:\RailsInstaller\Ruby2.1.0\bin\ruby.exe"
arguments=""C:\RailsInstaller\Ruby2.1.0\bin\rails" server -p %HTTP_PLATFORM_PORT% -b 127.0.0.1">
<environmentVariables>
<environmentVariable name="foo" value="bar"/>
</environmentVariables>
</httpPlatform>
</system.webServer>
</configuration>
You want to see Announcing: Running Ruby on Rails on IIS8 (or anything else, really) with the new HttpPlatformHandler
Upvotes: 1
Reputation: 6344
You'll want to check out Ruby On Rails for IIS. It leverages a few community technologies to run your Rails application inside of an IIS site.
It's still kinda ugly though!
Upvotes: 1