asp.net – Mono apache2 =服务暂时不可用(503)
发布时间:2020-05-28 16:33:23 所属栏目:asp.Net 来源:互联网
导读:一个星期以来,我一直在尝试使用apache运行我的单声道配置. 我一定试过几乎任何东西,可耻的是我注意到没有变化,问题依然存在. 当我尝试连接到服务器时,我收到503错误:服务暂时不可用 当我看一下errror日志时,它显示为空,我很确定这不是一个权限问题. 关于apac
|
一个星期以来,我一直在尝试使用apache运行我的单声道配置.
当我尝试连接到服务器时,我收到503错误:服务暂时不可用 关于apache: Package: apache2 Priority: optional Section: httpd Installed-Size: 36 Maintainer: Debian Apache Maintainers <debian-apache@lists.debian.org> Architecture: amd64 Version: 2.2.16-6+squeeze4 Depends: apache2-mpm-worker (= 2.2.16-6+squeeze4) | apache2-mpm-prefork (= 2.2.16-6+squeeze4) | apache2-mpm-event (= 2.2.16-6+squeeze4) | apache2-mpm-itk (= 2.2.16-6+squeeze4),apache2.2-common (= 2.2.16-6+squeeze4) 关于mono: Package: mono-apache-server2 Priority: optional Section: httpd Installed-Size: 260 Maintainer: Debian Mono Group <pkg-mono-group@lists.alioth.debian.org> Architecture: all Source: xsp Version: 2.6.5-3 Replaces: mono-server Depends: debconf (>= 0.5) | debconf-2.0,mono-runtime (>= 1.1.8.1),libc6 (>= 2.11) | libc6.1 (>= 2.11) | libc0.1 (>= 2.11),libmono-corlib2.0-cil (>= 2.6.3),libmono-posix2.0-cil (>= 2.4),libmono-security2.0-cil (>= 2.6.7),libmono-system-web2.0-cil (>= 1.9.1),libmono-system2.0-cil (>= 2.6.3),mono-xsp2-base (= 2.6.5-3),perl-modules 我正在使用下面的配置. <VirtualHost *:80>
ServerName myapp.example.com
ServerAdmin webmaster@example.com
DirectoryIndex index.html index.aspx
DocumentRoot /var/www/vhosts/example.com/subdomains/myapp/httpdocs/
# MonoServerPath can be changed to specify which version of ASP.NET is hosted
# mod-mono-server1 = ASP.NET 1.1 / mod-mono-server2 = ASP.NET 2.0
# For SUSE Linux Enterprise Mono Extension,uncomment the line below:
# MonoServerPath myapp.example.com "/opt/novell/mono/bin/mod-mono-server2"
# For Mono on openSUSE,uncomment the line below instead:
MonoServerPath myapp.example.com "/usr/bin/mod-mono-server2"
#mod-mono-server2
# To obtain line numbers in stack traces you need to do two things:
# 1) Enable Debug code generation in your page by using the Debug="true"
# page directive,or by setting <compilation debug="true" /> in the
# application's Web.config
# 2) Uncomment the MonoDebug true directive below to enable mod_mono debugging
MonoDebug myapp.example.com true
# The MONO_IOMAP environment variable can be configured to provide platform abstraction
# for file access in Linux. Valid values for MONO_IOMAP are:
# case
# drive
# all
# Uncomment the line below to alter file access behavior for the configured application
MonoSetEnv myapp.example.com MONO_IOMAP=all
#
# Additional environtment variables can be set for this server instance using
# the MonoSetEnv directive. MonoSetEnv takes a string of 'name=value' pairs
# separated by semicolons. For instance,to enable platform abstraction *and*
# use Mono's old regular expression interpreter (which is slower,but has a
# shorter setup time),uncomment the line below instead:
# MonoSetEnv myapp.example.com MONO_IOMAP=all;MONO_OLD_RX=1
MonoApplications myapp.example.com "/:/var/www/vhosts/example.com/subdomains/myapp/httpdocs/"
<Location "/">
Order allow,deny
Allow from all
MonoSetServerAlias myapp.example.com
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>
ErrorLog /var/www/vhosts/example.com/subdomains/myapp/logs/error.log
CustomLog /var/www/vhosts/example.com/subdomains/myapp/logs/access.log combined
</VirtualHost>
谁能帮我吗. 提前致谢, 解决方法你试过 mod_mono AutoConfiguration feature吗?这显然是Apache / Mono / ASP.NET堆栈的最佳方法.有了它,您不再需要在虚拟主机中定义所有Mono设置. 这是我的mod_mono.conf文件(在Mac OS X 10.7.2和Linux Ubuntu 11.04上,这应该与您的Debian发行版兼容): <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 false
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>
最重要的指令是“MonoAutoApplication”. <VirtualHost *:80>
ServerName www.monorules.fr
DocumentRoot "/Library/WebServer/Documents/MonoRules"
</VirtualHost>
如您所见,虚拟主机被简化为最简单的表达式. mod_mono.conf文件中定义的设置由所有虚拟主机共享.此解决方案的唯一缺点是它不允许您只重新启动ASP.NET站点的一个实例(如在Microsoft IIS中).如果使用Mono控制面板(请参阅“位置”部分)重新启动该过程,则会重新启动所有ASP.NET应用程序. (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net – 基于基于角色的安全隐藏Html.ActionLinks
- entity-framework-4 – 首先在实体框架代码中使用导航属性
- 获取Asp.net/iis设置Cache-control:静态文件的max-age
- 为不同的ASP.NET MVC 3区域提供不同的登录页面
- Asp.NET DropDownList在PostBack之后重置SelectedIndex
- ASP.NET:HTTP错误500.19 – 内部服务器错误0x8007000d
- asp.net – 敏捷,Scrum和CMMI TFS流程模板之间有什么区别
- ASP.net MVC Webforms视图引擎的缺点?
- asp.net核心 – 如何排除在ASP.NET Core中发布文件?
- asp.net – 如何使用带有TemplateFields的ObjectDataSource
推荐文章
站长推荐
- ASP.NET C#静态变量是全局的?
- asp.net-mvc – mvc4future无法在ASP.NET MVC 5中
- asp.net – 在将MVC和路由添加到WebForms项目后,
- asp.net-mvc – 无法加载文件或程序集Oracle.Dat
- asp.net-mvc – MVC网站转发到/ Account / Login
- ASP.NET 1.1到4.0迁移:事件不工作
- asp.net – Page.RouteData.Values对于一个页面是
- ASP.NET MVC中的自定义文件夹结构5
- asp.net-mvc-3 – ASP MVC 3测试控制器调用Model
- asp.net-mvc-3 – 具有ASP.NET MVC3和嵌入式Razo
热点阅读
