[Pkg-mono-devel] libapache2-mod-mono

Fabian Fagerholm fabbe@paniq.net
Sat, 07 Aug 2004 12:12:49 +0300


--=-Q1oaphIz4hT75fPkO4AC
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Fri, 2004-08-06 at 10:06 -0500, Pablo Fischer wrote:
> Could be, but I'm not happy with this, mod_mono is for *production*
> servers, so, if you have a production server is obvious to setup high
> privileges, imagine that any user can setup an alias?.=20

Think about the following scenarios:
      * Company A wants to launch an ASP.NET-based web site using Mono.
        They have the resources to buy a server and set it up
        themselves. They want to host only one site on the server. Their
        webmaster will keep the site up-to date.
      * Company B wants to launch an ASP.NET-based web site using Mono.
        They have the resources to buy a server and set it up
        themselves. They are planning to host two sites on the server,
        to serve both their customers and their business partners. Their
        marketing team has web designers who will construct the visual
        aspects of the site, and a group of people who will insert the
        content and keep it up-to-date. They have some skilled
        programmers who will write the code to drive the sites. However,
        they have a company policy that server and OS maintenance is the
        task of the IT department, so no one else must gain root access
        to the server.
      * Company C wants to launch an ASP.NET-based web site using Mono.
        They contact their hosting provider and explain their limited
        budget. The service provider offers hosting in a shared
        environment. Company C will produce the site themselves, while
        the hosting provider will make sure the server is in good shape,
        the software is correctly installed, security updates for the
        system software are applied, and the shared environment provides
        complete and secure separation between customers' data.
      * Company D wants to launch a web site. They outsource everything
        to a service provider. The service provider hosts their ASP.NET
        web site using Mono in a shared server environment, and provides
        a web-based update tool. They must assure Company D that there
        is no risk of interfering with other web sites on the same
        server.
      * Joe User is a customer at a small ISP. He chose it because they
        offer ASP.NET hosting with Mono. Joe can upload his data using
        SFTP into his public_html directory. The ISP assigns him one web
        application alias prefix, /joeuser. Joe can then create more
        aliases under that namespace.
      * Joe is also setting up his own company, Joe.biz, and he wants to
        run his company web site using ASP.NET and Mono. His ISP creates
        a virtual host for him, http://www.joe.biz/. Using .htaccess
        files, Joe can create any web application alias he wants, and it
        won't interfere with other virtual hosts on the same server.

These are all examples of servers in production use. I think we need to
eventually support all of these cases, and probably more.

> I'm using this 'scheme' of .conf file to work xsp/mod-mono packages in a
> different directory and give the user (well... root) a 'nice' way to
> setup his ASP.NET apps, you are free of using mono-server-update.conf or
> mono-server-admin.conf.=20

This is very good, but I think it would be even better if you didn't
need to be root to do things when you have your own virtual host. Of
course, users should not be able to disrupt service by creating
conflicting aliases, but if they have a namespace separating them from
each other, I don't see why they couldn't create any alias in their own
namespace.

However, that's probably a future goal. Right now we just have to get
the same functionality and interface for apache and apache2.

> I'd preffer the same schema for apache2 :-), if www-config does not
> works with apache2, why not a symlink?
>=20
> /etc/apache/conf.d/mono.conf -> /etc/mono-server/mono-server-hosts.conf

Yes, I was thinking along the same lines. Instead of a symlink, though,
I'd have /etc/apache2/modules-available/mod_mono.conf look like this:

AddType application/x-asp.net .aspx .ashx .asmx .ascx .config .ascx
DirectoryIndex index.aspx
Include /etc/mono-server/mono-server-hosts.conf

That way, if a user chooses to disable the mod_mono module
with /sbin/a2dismod, it will Just Work (tm). If there were an extra
symlink to take care of, things would break.

This patch could be applied:
--- libapache2-mod-mono.conf.old 2004-08-03 15:18:59.000000000 +0300
+++ libapache2-mod-mono.conf     2004-08-07 12:11:22.000000000 +0300
@@ -1,2 +1,4 @@
 AddType application/x-asp-
net .aspx .ashx .asmx .ascx .asax .config .ascx
 DirectoryIndex index.aspx
+# Include the web application definitions generated by mono-server-update.=
conf
+Include /etc/mono-server/mono-server-hosts.conf


While I'm at it, why is mono-server-update.conf not named update-mono-
server.conf like update-exim4.conf, update-rc.d, update-apache2-modules,
etc?

Cheers,
--=20
Fabian Fagerholm <fabbe@paniq.net>

--=-Q1oaphIz4hT75fPkO4AC
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQBBFJ0R76VUNpZBmeIRAnyPAJ0Ua7Dhi1hSKo5OzKFX+i17Yg8rMgCfZoJ6
U02Ry/D2bgh9vWhJgs3HK+U=
=sTaQ
-----END PGP SIGNATURE-----

--=-Q1oaphIz4hT75fPkO4AC--