# httpd.conf and aliases



## 3mors (Jan 27, 2003)

I'd like to let friends download files from my webserver.
The problem is that these files are outside root folder (DocumentRoot) of Apache, so I have to use aliases.

```
AliasMatch /firewire/ "/Volumes/firewire/"
	
&lt;Directory "/Volumes/firewire/"&gt;
    Options FollowSymLinks Indexes
&lt;/Directory&gt;
```
In this case I share files in firewire and on _http://localhost/firewire/_ i see the list of files.
But if I click on one of them (_aaa.sit_, for example), the download doesn't start and the browser go to _http://localhost/firewire/aaa.sit/_ and I see the same list of /firewire/.

How to tell apache to let download these files?


----------



## kukident (Jan 29, 2003)

I'm not that great an apache expert, but maybe it's syntax?

Alias /Firewire/ "/Volumes/firewire/"

Apparently aliasmatch is used when an alias is a regular expression:

Did you chack your mime-types?
/private/etc/httpd/mime.types
declares th mime types, in it should be:

application/x-stuffit    sit

HIH


----------



## 3mors (Jan 29, 2003)

MMM
Do I have to do it for every file type I want to share?

If I have a sit, a zip, an mpeg, a pdf and other stuff, I'd like that they could be all downloadable, without changing httpd.conf everytime I put a new type file.


----------



## kukident (Jan 29, 2003)

I don't understand your last question (WHAT do you have to do for every file?)

I have some aliases, and they are just *Alias* (not *aliasmatch*) and it works fine, i can access files in these aliased directories with no trouble.

Mime-types are declared for filetypes (extensions like .sit)


----------



## 3mors (Jan 29, 2003)

eheheeh ahahahah ohohohoh

With alias it works!!!!

Thank you.


----------



## 3mors (Jan 29, 2003)

Only a last question:

if I share a folder, I can see Desktop DB and Desktop DF files via http.
How to hide them?


----------



## kukident (Jan 29, 2003)

> _Originally posted by 3mors _
> *Only a last question:
> 
> if I share a folder, I can see Desktop DB and Desktop DF files via http.
> How to hide them? *



As I figured out on http://www.apache.org/, AliasMatch is a way of making aliases to folders with names that fit in a regular expression.
So, For* would alias Formerly but also Fork.

You can hide files from view, using IndexIgnore.
Somewhere in your httpd.conf there's something like:

```
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
```

Add names or expressions that you don't want to show up.
For instance *.html will hide any file that ends in .html
So your line could be something like 
	
	



```
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t Desktop*
```

I think they will still be accessible if you ask for them directly. You could also restrict access using <files>.


Edit: Maybe it's better to make a folder on your disk, and make an alias to that: /Volumes/FireWire/SomeFolder
That way the Desktop DB etc. are under the aliased file and won't be seen or accessed anyway


----------

