title: multiple self-hosted webapi on same server
body: <p>I want to host, mutiple self-hosted webapi's along with the web-site on the same machine / windows 2k8 server. For hosting the website I am using IIS. and for webapi's I would be using self-hosted webapi 2. How do I configure using self-hosted webapi, so that everything can work in sync on same server.</p>
  
  <p>So lets say I will host the website at <a href="http://example.com/mysite" rel="nofollow">http://example.com/mysite</a> and I will be hosting the webapi at <a href="http://example.com/apiws" rel="nofollow">http://example.com/apiws</a> and <a href="http://example.com/apiui" rel="nofollow">http://example.com/apiui</a></p>
  
  <p>I am using windows service for the configuration. This is how the web-api self hosting looks like as of now - for first webapi.</p>
  
  <pre><code>    protected override void OnStart(string[] args)
      {
          _config = new HttpSelfHostConfiguration(ServiceAddress);
  
          _config.MapHttpAttributeRoutes();
  
          _config.Routes.MapHttpRoute("DefaultApi",
              "apiws/{controller}/{id}",
              new { id = RouteParameter.Optional });
  
          _server = new HttpSelfHostServer(_config);
  
          _server.OpenAsync().Wait();
      }
  </code></pre>
  
  <p>the configuration is almost same for the second server as well. </p>
  
  <p>My question is having all of them working on the same port, is it possible? are there any issues which might arise? etc?</p>