[Mono-list] mod_mono with apache2x virtual hosts and Linux trouble
Ted Knab
tknab2 at washcoll.edu
Thu Jul 19 10:35:00 EDT 2007
I am having trouble getting asp web scripts to load. When I try and load
the scripts in a browser, I get a download pop up. I am not getting any
errors in the apache error log. How to get more information about what
Mono is doing ?
Does my configuration look right ?
Apache configuration:
============================
My virtual host configuration has the following lines at the end of it:
#mono for a virtual host pointing to /var/www/mono_demo
MonoServerPath /usr/bin/mod-mono-server2
Alias /mono_demo /var/www/mono_demo
MonoApplications "/mono:/usr/share/mono"
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
AddType application/x-asp-net .asp
<Directory /var/www/mono_demo>
SetHandler mono
</Directory>
</VirtualHost>
Apache Logs:
=======================
Error logs:
[Thu Jul 19 10:28:34 2007] [notice] Apache/2.2.3 (Debian) mod_mono/1.2.1
configured -- resuming normal operations
Access logs:
myip - - [19/Jul/2007:10:28:53 -0400] "GET /mono_demo/test.aspx
HTTP/1.1" 304 - "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US;
rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5"
myip - - [19/Jul/2007:10:28:53 -0400] "GET /mono_demo/test.aspx
HTTP/1.1" 304 -
myip - - [19/Jul/2007:10:32:56 -0400] "GET /mono_demo/Default.aspx
HTTP/1.1" 304 - "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US;
rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5"
myip - - [19/Jul/2007:10:32:56 -0400] "GET /mono_demo/Default.aspx
HTTP/1.1" 304 -
Test scripts
===========================
As a test, I have 2 asp files in a directory called '/var/www/mono_demo'
#cat test.aspx
<html>
<body>
<% Response.Write("Hello World!"); %>
</body>
</html>
#cat Default.aspx
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd>
<script runat=server>
protected void Page_Load(Object sender, EventArgs e)
{
Label1.Text = Hello World!;
}
</script>
<html xmlns=http://www.w3.org/1999/xhtml>
<head runat=server>
<title>Hello World</title>
</head>
<body>
<form id=form1 runat=server>
<div>
<asp:Label ID=Label1 runat=server Text=Label></asp:Label>
</div>
</form>
</body>
</html>
More information about the Mono-list
mailing list