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

Fabian Fagerholm fabbe@paniq.net
Tue, 10 Aug 2004 12:36:32 +0300


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

On Sat, 2004-08-07 at 14:35 -0500, Pablo Fischer wrote:
> >       * 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 provide=
s
> >         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.
> This is a problem. If they have everything in one domain (domain1.com),
> but if they have a domain for each customer this should not be a problem
> at all.

Ok, I think we can assume that each customer has a separate domain, so
no problem here.

> >       * 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 we=
b
> >         application alias prefix, /joeuser. Joe can then create more
> >         aliases under that namespace.
> ???.. The sysadmin can create a alias prefix to
> /home/joe/public_html_asp/ and that's all, Joe can create any directory
> as he wants,=20
>=20
> http://foobar.com/joe (/home/joe/public_html_asp/)
> http://foobar.com/joe/school (/home/joe/public_html_asp/school)
> http://foobar.com/joe/work (/home/joe/public_html_asp/work).
>=20
> And cause you (sysadmin) are keeping ALL the JOE public directories with
> mod_mono, there's no need to setup more alias or handle more alias for
> that user.

Will this work correctly with mod_userdir? Let's say I have mod_userdir
activated in Apache (1 or 2). Could the update script automatically
create the neccessary aliases according to some configurable scheme, for
example "every user's ASP.NET application is located in
~/public_html/asp" or "every user's ASP.NET application is located in
~/public_asp" or whatever directory the local admin has chosen.

What I'm getting at is this: mod_userdir is commonly configured with
something like this:

<IfModule mod_userdir.c>
 UserDir public_html
 UserDir disabled root

 <Directory /home/*/public_html>
  ...
 </Directory>
</IfModule>

This requires no editing of Apache configuration when a user is added or
removed. Can we accomplish the same when a site is using mod_mono as
well as mod_userdir?

> >       * Joe is also setting up his own company, Joe.biz, and he wants t=
o
> >         run his company web site using ASP.NET and Mono. His ISP create=
s
> >         a virtual host for him, http://www.joe.biz/. Using .htaccess
> >         files, Joe can create any web application alias he wants, and i=
t
> >         won't interfere with other virtual hosts on the same server.
> He can, why not? Just have a .htaccess.
>=20
> Now, reading all the scenarios, we can mix two solutions: root admin can
> setup the 'main' configuration for a user (foo, companyN, etc) and the
> user can setup more applications under his workspace.
>=20
> For example:
> <VirtualHost *>
>      ServerName foobar.com
>      ServerAlias www.foobar.com foobar.com=20
>        <Directory /home/user/public_asp>
>          SetHandler mono
>            <IfModule mod_dir.c>
>               DirectoryIndex index.aspx
>            </IfModule>
>        </Directory>
> </VirtualHost>
>=20
> With this configuration (in /etc/mono-server/mono-server-hosts.conf) you
> give any options to user (/home/user) to setup ANY http directives with
> .htaccess and does not matters if a user wants a foobar.com/monodoc
> cause you (sysadmin) are setting mono to the /home/user/public_asp
> directories.
>=20
> So, we can continue keeping the mono-server-hosts.conf with no changes.

Ok, this sounds good, there is just the point above about requiring no
extra steps when a regular user is added and you use mod_userdir. Would
something like this work:

<VirtualHost *>
 ServerName foobar.com
 ServerAlias www.foobar.com foobar.com
 <Directory /home/*/public_asp>
  SetHandler mono
  <IfModule mod_dir.c>
   DirectoryIndex index.aspx
  </IfModule>
 </Directory>
</VirtualHost>

I assume the usual Apache directives will work so that the server admin
can restrict what the user can set in the .htaccess file?

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

--=-5dAWGs5jtyO1ni8ePHWI
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)

iD8DBQBBGJcg76VUNpZBmeIRAu7YAJ9q2QY8zuwdk2t1QanhPi5U2R0+swCfVeev
pvz80xiOiIkkkZgPPgDXH/A=
=druW
-----END PGP SIGNATURE-----

--=-5dAWGs5jtyO1ni8ePHWI--