使用 Apache2 设置 ModMono
我最终尝试按照本指南在 Apache2 上使用 ModMono 设置 ASP。
然而,它不起作用:当我单击 .aspx 文件时,我最终只是将其下载到我的本地主机上。
这是我的 asp.webapp 文件 /etc/mono-server2
<apps>
<web-application>
<name>asp</asp>
<vpath>/asp</vpath>
<path>/var/www/asp/</path>
<vhost>127.0.0.1</vhost>
</web-application>
</apps>
和 /etc/apache2/sites-available/ 中的 asp 文件
<Virtualhost 127.0.1.1:80>
ServerName asp
DocumentRoot /var/www/asp/
<Directory /var/www/asp/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow, deny
Allow from all
SetHandler mono
DirectoryIndex index.aspx index.html
</Directory>
</VirtualHost>
我在这里做错了什么吗?我能想到的唯一问题是我试图引用一个目录,而不是特定的页面或文件。
I ended up attempting to setup ASP with ModMono on Apache2, via following this guide.
It's not working, however: when I click a .aspx file, I end up just downloading it on my localhost.
Here's my asp.webapp file /etc/mono-server2
<apps>
<web-application>
<name>asp</asp>
<vpath>/asp</vpath>
<path>/var/www/asp/</path>
<vhost>127.0.0.1</vhost>
</web-application>
</apps>
and my asp file in /etc/apache2/sites-available/
<Virtualhost 127.0.1.1:80>
ServerName asp
DocumentRoot /var/www/asp/
<Directory /var/www/asp/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow, deny
Allow from all
SetHandler mono
DirectoryIndex index.aspx index.html
</Directory>
</VirtualHost>
Is there anything which I'm doing wrong here? The only issue I can think of is that I'm trying to reference a directory, rather than a specific page or file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您已经安装了 mod_mono 并且它已正确配置为与 apache2 一起使用,那么您需要做的就是将 /etc/apache2/sites-available/ 中的站点配置更改为如下所示:
If you have installed mod_mono and it is configured correctly to work with apache2 then all you will need to do is change your site configuration in /etc/apache2/sites-available/ to something like this: