[Mono-list] tutorial : Mono & Apache

Gonzalo Paniagua Javier gonzalo.reply.to.the.list.iam.subscribed@ximian.com
Thu, 08 Jul 2004 18:40:10 +0200


El jue, 08-07-2004 a las 12:00, eric.lemoine@esial.uhp-nancy.fr
escribió:
>  Hi,
> 
>  given that I had some trouble running ASP.NET with Mono and Apache, I have
> written a small tutorial to do it.
> 
>  eric lemoine (eric.lemoine@esial.uhp-nancy.fr)
> 
> 
> Running ASP.NET with Mono & Apache
> 
> 
> Config
> ------
> OS        =  Red Hat 9
> Mono/XSP  =  1.0 beta 1 (rpm)
> Apache    =  2.0.50 (source code)
> mod_mono  =  1.0 (source code)
> 
> ASP.NET pages (index.aspx,...) are in /usr/share/doc/xsp/test
> 
> 
> Testing XSP
> -----------
> # mono /usr/bin/xsp.exe --root /usr/share/doc/xsp/test
> Mozilla => http://localhost:8080/index.aspx
> 
> 
> Installing Apache
> -----------------
> extract files
> # ./configure
> # make
> # make install
> => files are created in /usr/local/apache2
> 
> 
> Installing mod_mono
> -------------------
> extract files
> # ./configure
> # make
> # make install
> => libmod_mono.so is created in /usr/local/apache2/modules
> 
> 
> Configuring files
> -----------------
> Open /usr/local/apache2/conf/httpd.conf and add :
> 
> LoadModule mono_module modules/libmod_mono.so
> Alias /demo "/usr/share/doc/xsp/test"
> MonoApplications "/demo:/usr/share/doc/xsp/test"
> <Directory /usr/share/doc/xsp/test>
>       SetHandler mono
> </Directory>
> 
> ServerName 127.0.0.1:80
> 
> 
> Starting mod_mono & Apache
> --------------------------
> # mono /usr/bin/mod-mono-server.exe --root /usr/share/doc/xsp/test
> --applications /demo:/usr/share/doc/xsp/test

You don't need this step if you install run configure --prefix=/usr in
mod_mono or tell the apache module where 'mono' executable and
'mod-mono-server.exe' are located.

> # chmod 666 /tmp/mod_mono_server
> # /usr/local/apache2/bin/apachectl -k start
> 
> 
> Testing Apache & ASP.NET pages
> ------------------------------
> Mozilla => http://localhost/
> Mozilla => http://127.0.0.1/demo/index.aspx

Apart from that, everything is like it's in the INSTALL file ;-).

-Gonzalo