make apache2 serve file as htmL? (kinda urgent)
Matt Price
matt.price-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Fri Jan 12 03:45:45 UTC 2007
On Thu, 2007-11-01 at 20:39 -0500, CLIFFORD ILKAY wrote:
> On Thursday 11 January 2007 20:21, Matt Price wrote:
> > Hi folks,
> >
> > I just screwed up and wrote down the wrong url in my lecture:
> > http://www.derailleur.org/global
> > instead of
> > http://www.derailleur.org/global.html
> >
> > so I thought, no problem, I'll just copy the page over. But as you
> > can see by clicking the above links, the first one is served up as
> > text. I tried changing
> > DefaultType text/plain
> > to
> > DefaultType text/html
> >
> > in
> > /etc/apache2/apache2.conf, and also in ROOT/.htaccess for this
> > host,
> >
> > but neither had any effect.am I doing something wrong?
> >
> > All help much appreciated! thanks,
>
> Hi Matt,
>
> If Apache is configured to follow symlinks, you could just put a
> symlink from global to global.html.
Thanks clifford,
I tried that, but it didn't work -- it seemed as though apache only read
the file extension on the real file.
Anyway, I have something that seems to be working right now:
<Directory "/var/www/derailleur.org">
DefaultType text/html
</Directory>
in /etc/apache2/sites-available/derailleur.org
THat seems to be doingthe trick for now. Not a great solution -- I'm
not sure whether the directive is limited to the directory in question,
or if it also applies to all subdirectories? anyway, will only keep it
this way for a few days I guess.
thanks,
matt
--
Matt Price
History Dept
University of Toronto
matt.price-H217xnMUJC0sA/PxXw9srA at public.gmane.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gtalug.org/pipermail/legacy/attachments/20070111/b55abefe/attachment.sig>
More information about the Legacy
mailing list