Está en la página 1de 3

Build ASP.NET/Mono Applications with mod_mono and Apache on Ubuntu 10.

04 (Lucid)
Before installing mod_mono we must ensure that the universe repositories are enabled on your system. Your /etc/apt/sources.list should resemble the following (you may have to uncomment or add the universe lines:) File: /etc/apt/sources.list
## main & restricted repositories deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted deb http://security.ubuntu.com/ubuntu lucid-security main restricted deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted ## universe repositories deb http://us.archive.ubuntu.com/ubuntu/ lucid universe deb-src http://us.archive.ubuntu.com/ubuntu/ lucid universe deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe deb http://security.ubuntu.com/ubuntu lucid-security universe deb-src http://security.ubuntu.com/ubuntu lucid-security universe

If you had to enable new repositories, issue the following command to update your package lists:
apt-get update apt-get upgrade

Install Apache by running the following command:


apt-get install apache2

The Apache daemon must be stopped before mod_mono is installed.


/etc/init.d/apache2 stop apt-get install mono-apache-server2 libapache2-mod-mono libmono-i18n2.0-cil

While installing, you will see a prompt that looks like the following:
Configuration file `/etc/apache2/mods-available/mod_mono.conf' ==> File on system created by you or by a script. ==> File also in package provided by package maintainer. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version

D : show the differences between the versions Z : background this process to examine the situation The default action is to keep your current version. *** mod_mono.conf (Y/I/N/O/D/Z) [default=N] ? Accept the default option at this point.

When the installation process completes start Apache with the following command:
/etc/init.d/apache2 start Enable Mod-mono-server: ======================== sudo a2enmod mod-mono

Create a site on the root of our example domain, test_mono. Create the virtual host file, taking the following example virtual host configuration and modifying it to suit your needs.
<VirtualHost *:80> ServerName test_mono ServerAdmin web-admin@test_mono ServerAlias test_mono DocumentRoot /var/www/test_mono/public_html ErrorLog /var/www/test_mono/logs/error.log CustomLog /var/www/test_mono/logs/access.log combined MonoServerPath test_mono "/usr/bin/mod-mono-server2" MonoDebug test_mono true MonoSetEnv test_mono MONO_IOMAP=all MonoApplications test_mono "/:/var/www/test_mono/public_html" <Location "/"> Allow from all Order allow,deny MonoSetServerAlias test_mono 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>

OR we can use
http://go-mono.com/config-mod-mono/Default.aspx to generate the above configuration file. Download this file, remove extension (.conf) and move to /etc/apache2/sites-available.

Ubuntu server-mono-configuration: ========================= change httpd.conf & add the line : MonoAutoApplication enabled Refer following link if required : http://www.smithvoice.com/ubuntu-810-server-mono-configuration Enable your own site : ================= sudo a2ensite test_mono

También podría gustarte