[Gllug] apache question
Stuart Sears
stuart at sjsears.com
Sat Apr 15 13:29:16 UTC 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alain Williams wrote:
> I moaned to people to NOT put large attachments in email, but to put up links instead.
> OK they said, but we don't have access to a web server where we can put things.
> I have written a simple email handling script that saves files on a web server and
> returns them a URL that they can put into email to others on the mail list.
>
> It works well. It then occurred to me what happens if they put up a file: delete_everything.php ?
>
> Question: how to I get Apache to serve up all files in a particular directory as straight
> files, no trying to run as a CGI or whatever ?
>
> I want to allow that to still work in other directories.
>
> I have played with a few Options but have not got anywhere ...
Have you looked at ForceType ?
from waht i read this might help a bit...
(it's also in the apache2.2 docs, but this is teh first mentin that I
found of it...)
<from http://httpd.apache.org/docs/1.3/mod/mod_mime.html#forcetype >
###########
ForceType directive
Syntax: ForceType media-type|None
Context: directory, .htaccess
Status: Base
Module: mod_mime
Compatibility: ForceType is only available in Apache 1.1 and later.
When placed into an .htaccess file or a <Directory> or <Location>
section, this directive forces all matching files to be served as the
content type given by media type. For example, if you had a directory
full of GIF files, but did not want to label them all with ".gif", you
might want to use:
ForceType image/gif
Note that this will override any filename extensions that might
determine the media type.
You can override any ForceType setting by using the value of none:
# force all files to be image/gif:
<Location /images>
ForceType image/gif
</Location>
# but normal mime-type associations here:
<Location /images/mixed>
ForceType none
</Location>
#################
that and some options directives to turn off CGI and so on may be what
you need.
Regards
Stuart
- --
Stuart Sears RHCA RHCX
To err is human, to forgive is Not Company Policy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFEQPUramPtx1brPQ4RAikZAJ9AspLdGtG1drCYAO5gMvOL4gahZgCbBHuD
DQhOiCHUSkvfmTM005O+VEs=
=A49Z
-----END PGP SIGNATURE-----
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list