Frage

Ich versuche, Mono zu bekommen auf CentOS 5 zu arbeiten, aber nicht viel Erfolg bisher gehabt haben. Dies ist, was ich getan habe:

> yum install mono-web
> yum install xsp
> yum install mod_mono
> echo ":CLR:M::MZ::/usr/bin/mono:" > /proc/sys/fs/binfmt_misc/register

dafür gesorgt, dass die folgende Zeile in /etc/httpd/conf/httpd.conf ist:

Include conf.d/*.conf

dafür gesorgt, dass /etc/httpd/conf.d/mod_mono.conf existiert und sieht wie folgt aus:

<IfModule !mod_mono.c>
    LoadModule mono_module /usr/lib/httpd/modules/mod_mono.so

    AddType application/x-asp-net .aspx
    AddType application/x-asp-net .asmx
    AddType application/x-asp-net .ashx
    AddType application/x-asp-net .asax
    AddType application/x-asp-net .ascx
    AddType application/x-asp-net .soap
    AddType application/x-asp-net .rem
    AddType application/x-asp-net .axd
    AddType application/x-asp-net .cs
    AddType application/x-asp-net .config
    AddType application/x-asp-net .Config
    AddType application/x-asp-net .dll
    DirectoryIndex index.aspx
    DirectoryIndex default.aspx
    DirectoryIndex Default.aspx

    <Location /mono-ctrl>
        SetHandler mono-ctrl
    </Location>
</IfModule>

Erstellt /etc/httpd/conf.d/mono-vhost.conf und eingefügt wie folgt vor:

<VirtualHost *>
    DocumentRoot /var/www/html
    Alias /demo /usr/local/lib/xsp/test
    MonoApplications "/demo:/usr/local/lib/xsp/test"
    MonoServerPath /usr/bin/mod-mono-server2

    <Location /demo>
        SetHandler mono
    </Location>
</VirtualHost>

Und schließlich:

> apachectl restart

Dann durchsuchte ich http: //my.server.ip.address/demo /index.aspx , erwartet eine ASPX-Seite zu sehen; stattdessen mein Browser mich dazu veranlasst, diese Datei zum Download bereit. Es gibt nichts in dem Apache-Fehlerprotokoll.

Ich habe andere Websites bekam auf dieser Box via PHP laufen und sie arbeiten perfekt, so dass ich bin mir ziemlich sicher, dass es gerade ist mod_mono das ist seltsam, aber für das Leben von mir, ich kann nicht herausfinden, was das Problem ist. Wenn jemand mich in die richtige Richtung zeigen kann, wäre es am meisten geschätzt werden.

War es hilfreich?

Lösung

Schließlich wurde es mit Hilfe der folgenden Anleitung arbeiten:

http://blog.palehorse.net/2008/11/06/my-adventures-installing-mono-20-on-centos-4-to-work-with-apache- via-mod_mono /

Auch wenn es für CentOS 4 ist es funktioniert genauso gut auf CentOS 5.x. :)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top