httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mads Rosendahl <>
Subject Re: AW: [users@httpd] virtualhost with file
Date Fri, 02 Sep 2005 13:08:52 GMT
That would be my preferred solution as well.

Or simply specify the file as default-document for the site/folder with 

I never use "Options Indexes" !!! I don't want to allow directory 
browsing, unless needed in special
cases. For security reasons.

By why would you want to do it this way to begin with? It is not common 
to have a pdf-file as default
document. You will only have problems with it, and confused users. And 
you can't specify HTML meta
headers such as title, keywords, author and so on.

Just some thoughts:
When you send non-html content to users, the response header 
Content-Type is used by the client
to determine what to do with it, in this case "Content-Type: 
application/pdf". Apache uses the filename
suffix to determine mime-type, as specified in /etc/mime.types in linux. 
Will apache return the correct
Content-Type header when the requested resource is a folder? Just a 
thought.... Otherwise the browser
will get really confused.

Guenther, Christian wrote:

> why not use a redirect to a file, in that case the pdf?
> Christian G├╝nther
> SAP NetWeaver Technical Consultant
> *REALTECH system consulting GmbH*
> Industriestra├če 39c
> 69190 Walldorf Germany
> Tel.: +49.6227.837.267
> Mobile: +49.173.2571.326
> Fax: +49.6227.837.837
> mailto:
> ------------------------------------------------------------------------
> *Von:* eoghan
> *Gesendet:* Fr 02.09.2005 13:58
> *An:*
> *Betreff:* [users@httpd] virtualhost with file
>Im wondering if its possible to specify a file in the DocumentRoot?
>For example:
><VirtualHost *>
>ServerName www.otherdomain.tld
>DocumentRoot /www/otherdomain/myfile.pdf
>So if I have a pdf located here:
>and i want it accessible:
>I know it will require adobe plugin for the user...
>If not, is there some way of doing it?
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:> for more info.
>To unsubscribe, e-mail:
>   "   from the digest:
>For additional commands, e-mail:

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message