0

I successfully installed Apache, Mono, XSP Server and MonoDevelop on a CentOS 7 machine, basically following http://www.mono-project.com/docs/getting-started/install/linux/#centos-fedora-and-derivatives (with added yum install -y xsp, and yum install -y monodevelop. Mono Develop works and I can create and run ASP.NET websites with it (via XSP Server).

But I need to integrate Mono with Apache. To do this I installed mod_mono (yum install -y mod_mono) and created a configuration for a test application via http://go-mono.com/config-mod-mono/. I changed the mono server version to 4 and added granting open access:

Alias /mono-test "/srv/www/mono-test"
MonoServerPath mono-test "/usr/bin/mod-mono-server4"
MonoDebug mono-test true
MonoApplications mono-test "/mono-test:/srv/www/mono-test"
<Location "/mono-test">
  Allow from all
  Order allow,deny
  MonoSetServerAlias mono-test
  SetHandler mono
  SetOutputFilter DEFLATE
  SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
  # Allow open access:
  Require all granted
</Location>

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
</IfModule>

I placed the file in /etc/httpd/confd with the name x-mono-test.conf, to be sure it is loaded after the default mod_mono.conf (content see at the end of this question).

The problem is that accessing a test aspx file in the Apache application (http://localhost/mono-test/test.aspx) results in a HTTP 503 - Service Unavailable. The Apache error log remains empty.

I would like to know what could be wrong or how I could find the source of this issue.

Content of mod_mono.conf:

<IfModule !mod_mono.c>
    LoadModule mono_module /usr/lib64/httpd/modules/mod_mono.so
</IfModule>

<IfModule mod_headers.c>
    Header set X-Powered-By "Mono"
</IfModule>

AddType application/x-asp-net .aspx
AddType application/x-asp-net .asmx
AddType application/x-asp-net .ashx
AddType application/x-asp-net .asax
AddType application/x-asp-net .ascx
AddType application/x-asp-net .soap
AddType application/x-asp-net .rem
AddType application/x-asp-net .axd
AddType application/x-asp-net .cs
AddType application/x-asp-net .vb
AddType application/x-asp-net .master
AddType application/x-asp-net .sitemap
AddType application/x-asp-net .resources
AddType application/x-asp-net .skin
AddType application/x-asp-net .browser
AddType application/x-asp-net .webinfo
AddType application/x-asp-net .resx
AddType application/x-asp-net .licx
AddType application/x-asp-net .csproj
AddType application/x-asp-net .vbproj
AddType application/x-asp-net .config
AddType application/x-asp-net .Config
AddType application/x-asp-net .dll
DirectoryIndex index.aspx
DirectoryIndex Default.aspx
DirectoryIndex default.aspx

migrated from stackoverflow.com Nov 3 '15 at 21:22

This question came from our site for professional and enthusiast programmers.

1

I think you miss one set in the configuration of apache with mono. I strongly suggest you to check this guide is for Ubuntu. I tried and it works fine with xsp and apache. I test some examples and work fine for everything except WCF (svc). Apparently, that support it still with a lot of problems in mono 2.10.

http://www.bgsoftfactory.net/run-asp-net-mvc-4-with-mysql-on-linux/

I think the problem could be that the virtual host is not active. But, that is a simple hunch.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.