Okay, my original question was answered by including the web application in the .webapp
file in the /etc/mono-server
directory. During the process I decided to try using only one virtual host for all related Mono/ASP projects, so I came to the following configuration for virtual directories (alias).
The mytestsite.local
virtual host (at /etc/apache2/sites-available/
and linked at /etc/apache2/sites-enabled/
)
<virtualhost *:80>
ServerAdmin webmaster@interlecto.net
ServerName mytestsite.local
ServerAlias mytestsite.mydomain.net *.mytestsite.mydomain.net
MonoAutoApplication disabled
AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx .axd
DocumentRoot /var/www/vhosts/mytestsite/root
<Directory /var/www/vhosts/mytestsite/root>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
DirectoryIndex Default.aspx index.aspx index.html
Alias /myproject "/home/myuser/source/myproject/myproject"
Alias /othertest "/home/myuser/source/othertest/othertest"
MonoApplications default "/myproject:/home/myuser/source/myproject/myproject,/othertest:/home/myuser/source/othertest/othertest"
<Location /myproject>
SetHandler mono
</location>
<Location /othertest>
SetHandler mono
</location>
<Directory /home/myuser/source/myproject/myproject>
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory /home/myuser/source/othertest/othertest>
AllowOverride None
Order allow,deny
Allow from all
</Directory>
LogLevel debug
ErrorLog /var/www/vhosts/mytestsite/log/error.log
CustomLog /var/www/vhosts/mytestsite/log/access.log combined
</virtualhost>
The debian.webapp
file (at /etc/mono-server4/
)
<apps>
<web-application>
<name>My Project</name>
<vpath>/myproject</vpath>
<path>/home/myuser/source/myproject/myproject</path>
<vhost>mytestsite.local</vhost>
</web-application>
<web-application>
<name>Other Test</name>
<vpath>/othertest</vpath>
<path>/home/myuser/source/othertest/othertest</path>
<vhost>mytestsite.local</vhost>
</web-application>
</apps>
At my Virtual Host root (/var/www/vhosts/mytestsite/root/
) I have a simple index.html
file allowing me to choose which test.
So now I have Mono (mod_mono for ASP.NET) working on a couple of virtual directories on a virtual host on Apache on Ubuntu.