Search code examples
monoservicestackmod-monoxsp

servicestack service on mod_mono / apache not found


I have a simple ServiceStack web service that I have working on my Macbook with xsp. With a browser I can view the metadata page and the service is working.

I just installed mono, mod_mono, xsp on a Fedora 14 box. I can see that the mono_module is loaded by apache.

I copied myservice to /var/www/html/myservice. Using a browser I can not open the metadata page as I do with xsp on the Mac and of course the web service is not accessible.

What needs to change when going from xsp to apache/mod_mono?


Solution

  • ServiceStack was used to create a RESTful Web Service accessible by URIs not files with extensions. AutoConfiguration of mod_mono added all of the mime types and file extensions but not the simple path (URI) to a web service.

    Solution: I added these lines to my httpd.conf to create a virtual path and to configure it to work with mod_mono.

    Alias /info "/var/www/html/myService"
    MonoApplications "/info:/var/www/html/myService"
    <Location /info>
        SetHandler mono
    </Location>
    

    Now http://localhost:8080/metadata works just fine.