2

I have some trouble to configure my apache 2.4 web server to host an asp .Net MVC project. The project is designed for the .Net framework 4.5. I have installed the mono framework (version 4.6.2), xsp and mod mono.

My problem is that the server displays me a list of files and directories of the project folder instead the Index.cshtml. It seems that the server don't redirect the URL to the mono server.

The mod_mono.conf in /etc/apache2/mods-enabled looks like:

AddType application/x-asp-net .aspx .ashx .asmx .ascx .asax .config .ascx 
DirectoryIndex Global.asax
Include /etc/mono-server4/mono-server4-hosts.conf

The application specific configuration under /etc/apache2/sites-enabled contains:

<VirtualHost *:80>
  ServerName SecurityWorkbench
  ServerAdmin web-admin@SecurityWorkbench
  DocumentRoot /var/www/html/SWB_WebApp
  MonoAutoApplication disabled
  AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx .axd

  MonoServerPath SecurityWorkbench "/usr/bin/mod-mono-server4"

  MonoSetEnv SecurityWorkbench MONO_IOMAP=all

  MonoApplications SecurityWorkbench "/:/var/www/html/SWB_WebApp"
  <Location "/">
    Allow from all
    Order allow,deny
    MonoSetServerAlias SecurityWorkbench
    SetHandler mono
    SetOutputFilter DEFLATE
    SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
  </Location>
  <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
  </IfModule>
</VirtualHost>

Does anyone have an idea what's wrong with my configuration?

Alucard
  • 317
  • 1
  • 3
  • 15
  • I have the same problem. Did you find the problem?
    https://stackoverflow.com/questions/56547027/apache-and-mono-cant-find-the-default-controller-and-show-the-homepage
    – Arash MAS Jun 11 '19 at 22:16

0 Answers0