You can just tell Apache to send all requests to mod_mono with the following line in your app's Apache .conf file:

1
SetHandler mono

There is also a change to do on Web.config because mod_mono doesn't support integrated pipeline mode, you need to add the following nodes:

1
2
3
4
5
6
7
8
9
10
11
12
13
<configuration>
  <system.web>
    <httpModules>
      <add name="WebSharper.RemotingModule" type="WebSharper.Web.RpcModule, WebSharper.Web" />
      <add name="WebSharper.Sitelets" type="WebSharper.Sitelets.HttpModule, WebSharper.Sitelets" />
    </httpModules>
    <!-- plus what's already there... -->
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <!-- plus what's already there... -->
  </system.webServer>
</configuration>

(We should probably look into adding these to the project template, if they don't cause any problems in other environments.)

You can then just copy the files for deploy with the same folder stucture as they have in the project folder. You need Web.config, bin/, Content/, Scripts/, plus of course any data files you use (eg Main.html for the default Client-Server app).

For reference, I just ran the default Client-Server app on Docker with the following Dockerfile:

1
2
3
4
5
6
7
8
9
10
FROM seif/mono-apache

# Change the line below to the path to your project
ENV projectDir=TestDocker

# seif/mono-apache gives the wrong name to the app's config file, fix it
RUN mv /etc/apache2/sites-available/default /etc/apache2/sites-available/000-default.conf

# deploy the app
ADD $projectDir/Web.config $projectDir/*.html $projectDir/bin $projectDir/Scripts $projectDir/Content /var/www
By on 10/9/2017 1:03 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper