[Mono-list] tutorial : Mono & Apache

eric.lemoine@esial.uhp-nancy.fr eric.lemoine@esial.uhp-nancy.fr
Thu, 8 Jul 2004 12:00:46 +0200


 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
# 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