问题描述
我试图通过做正是禁用AutoHosting。不过现在我得到无法连接到MOD-单服务器多次尝试产卵的过程后。在日志中。路径是正确的。
I'm doing exactly this by trying to disable AutoHosting. However now I get "Failed to connect to mod-mono-server after several attempts to spawn the process." in the logs. The path is correct
下面是我的配置:
<VirtualHost *:80>
ServerName myserver.com
DocumentRoot /home/abe/html/
MonoServerPath myserver.com "/usr/local/bin/mod-mono-server2"
MonoDebug myserver.com true
MonoSetEnv myserver.com MONO_IOMAP=all
MonoAutoApplication disabled
MonoApplications myserver.com "/:/home/abe/html/"
<Location "/">
Allow from all
Order allow,deny
MonoSetServerAlias myserver.com
SetHandler mono
</Location>
</VirtualHost>
修正:请参见下面的答案
Fixed: see the answer below.
通过修复,不过,我怎样才能得到的配置我想W / O做编辑的危险的过程中自动gen之类的httpd.conf?
With the fix, though, how can I get the configuration I want w/o doing the dangerous process of editing the auto-gen'd httpd.conf?
推荐答案
原来,这是与所定义的虚拟主机两次的问题 - 一旦在httpd.conf,一次在vhosts.conf。因此,修复是只使用一个虚拟主机块。但是,这会导致另一个问题,很遗憾。我在一个托管环境和httpd.conf文件是自动生成的,所以我真的不应该直接编辑它。然而,它是安全的编辑vhosts.conf。虚拟主机是由我的主机自动设置并注入到httpd.conf中。
Turns out this was an issue with the VirtualHost being defined twice - once in httpd.conf and once in vhosts.conf. So the fix was to use just one VirtualHost block. But this causes another problem, unfortunately. I'm in a hosted environment and httpd.conf is auto-generated so I really shouldn't be editing it directly. However it is safe to edit vhosts.conf. VirtualHost is automatically set by my host and injected into httpd.conf.
这篇关于httpd.conf中的多个虚拟主机部分(是:单声道ASP.NET MVC AutoHosting问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!