httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mads Rosendahl <m...@twilight.dk>
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 
DirectoryIndex?

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
> *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: christian.guenther@realtech.com
>  
>
> ------------------------------------------------------------------------
> *Von:* eoghan
> *Gesendet:* Fr 02.09.2005 13:58
> *An:* users@httpd.apache.org
> *Betreff:* [users@httpd] virtualhost with file
>
>Hello
>Im wondering if its possible to specify a file in the DocumentRoot?
>For example:
><VirtualHost *>
>ServerName www.otherdomain.tld
>DocumentRoot /www/otherdomain/myfile.pdf
></VirtualHost>
>So if I have a pdf located here:
>http://mysite.com/mypdf.pdf
>and i want it accessible:
>http://mysite.com/myguide/
>I know it will require adobe plugin for the user...
>If not, is there some way of doing it?
>Thanks
>Eoghan
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>  
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message