基本的 Mono 安装不起作用

Basic Mono installation wont work(基本的 Mono 安装不起作用)

本文介绍了基本的 Mono 安装不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 CentOS 5.3 机器作为产品服务器,并试图在那里运行单声道.经过多次筛选后,我设法通过 yum 安装了 2.10.2 版.我还以相同的方式安装了 xsp 和 mod_mono,并创建了一个简单的 hello world 网页.事情是它没有运行.我猜我的配置文件出了点​​问题,这就是我的责任.作为 linux 和 apache 配置的新手,我不知道有什么问题.

Am using a CentOS 5.3 box as prod server and am trying to get mono running there. after much sifting i managed to install version 2.10.2 via yum. i installed also xsp and mod_mono the same way and created a simple hello world web page. thing is its not running. iam guessing something is up with my config files which are responsible for this. Being a newbie on both linux and apache configuration, i dont know whats wrong.

我尝试关注网站上的一些相关回复,但我无法让它发挥作用.所以这就是我所做的:

I have tried to follow some relative responses on the site but i cant get it work. So here is what ive done:

通过 yum 安装了 mono、xsp 和 mod_mono;添加到 httpd.conf(我的在/usr/local/apache/conf)

installed mono, xsp and mod_mono via yum; added to httpd.conf (mine is in /usr/local/apache/conf)

包括/usr/local/apache/conf.d/*.conf"

Include "/usr/local/apache/conf.d/*.conf"

然后我创建了以下/usr/local/apache/conf.d/mod_mono.conf 文件:

then i created the following /usr/local/apache/conf.d/mod_mono.conf file :

MonoAutoApplication 已启用LoadModule mono_module/usr/lib/httpd/modules/mod_mono.so

MonoAutoApplication enabled 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

别名/gpsmapper/usr/local/apache/htdocs/gpsmapper

Alias /gpsmapper /usr/local/apache/htdocs/gpsmapper

MonoApplications "/gpsmapper:/usr/local/apache/htdocs/gpsmapper"

MonoApplications "/gpsmapper:/usr/local/apache/htdocs/gpsmapper"

MonoServerPath "/opt/novell/mono/lib/mono/4.0/mod-mono-server4.exe"

MonoServerPath "/opt/novell/mono/lib/mono/4.0/mod-mono-server4.exe"

SetHandler 单声道

SetHandler mono

我在 htdocs/gpsmapper 下创建了一个 index.aspx,但得到一个 503 服务暂时不可用.

i created an index.aspx under htdocs/gpsmapper but am getting a 503 Service temporarily unavailable.

是不是我设置错了?

推荐答案

您将MonoAutoApplication"和MonoApplications"混合在同一个文件中.我不认为它有效.AutoConfiguration 功能可以精确地避免必须声明应用程序.

You mix "MonoAutoApplication" and "MonoApplications" in the same file. I don't think it works. The AutoConfiguration feature allows precisely to avoid having to declare the application.

这是我自己的 mod_mono.conf(用于 Mac OS X 10.7.2 和 Linux Ubuntu 11.04):

Here is my own mod_mono.conf (used on Mac OS X 10.7.2 and Linux Ubuntu 11.04) :

<IfModule !mono_module>
    LoadModule mono_module "libexec/apache2/mod_mono.so"
</IfModule>

<IfModule mono_module>
    AddType application/x-asp-net .config .cs .csproj .dll .resources .resx .sln .vb .vbproj
    AddType application/x-asp-net .asax .ascx .ashx .asmx .aspx .axd .browser .licx .master .rem .sitemap .skin .soap .webinfo

    MonoAutoApplication enabled
    MonoDebug true
    MonoServerPath "/usr/bin/mod-mono-server4"
    MonoSetEnv LANG=fr_FR.UTF-8
    MonoUnixSocket "/tmp/.mod_mono"

    <IfModule dir_module>
        DirectoryIndex Default.aspx
    </IfModule>

    <DirectoryMatch "/(bin|App_Code|App_Data|App_GlobalResources|App_LocalResources)/">
        Order deny,allow
        Deny from all
    </DirectoryMatch>

    <Location "/Mono">
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1 ::1
        SetHandler mono-ctrl
    </Location>
</IfModule>

如您所见,我从未定义任何 Alias 或 MonoApplications 指令.

As you can see, I never define any Alias or MonoApplications directive.

这篇关于基本的 Mono 安装不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:基本的 Mono 安装不起作用

基础教程推荐