You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Vi <vi...@bexout.com> on 2004/03/15 10:49:56 UTC

[users@httpd] DefaultType text/plain?

Hi, in my httpd.conf I have: DefaultType text/plain
Is it possible to enter such value so that it will alway return nothing 
if it doesn't know type?
So for example if my php configuration for some reason fails, it won't 
show the sources?
Maybe DefaultType none ?

---------------------------------------------------------------------
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


Re: [users@httpd] DefaultType text/plain?

Posted by Vi <vi...@bexout.com>.
Well that's not so bad. I'll try that.

Joshua Slive wrote:

>On Mon, 15 Mar 2004, Vi wrote:
>
>  
>
>>Can't I configure apache so that whenever it doesn't know the type, it
>>sends error (for example 404 :))?
>>I mean, if I put file heh.blah, and apache is requested to return it, it
>>returns text/html with contents of an
>>error.
>>    
>>
>
>No, you can't.
>
>You can deny all access and then selectively allow access only for certain
>file extensions.
>
>Joshua.
>
>---------------------------------------------------------------------
>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


Re: [users@httpd] DefaultType text/plain?

Posted by Joshua Slive <jo...@slive.ca>.
On Mon, 15 Mar 2004, Vi wrote:

> Can't I configure apache so that whenever it doesn't know the type, it
> sends error (for example 404 :))?
> I mean, if I put file heh.blah, and apache is requested to return it, it
> returns text/html with contents of an
> error.

No, you can't.

You can deny all access and then selectively allow access only for certain
file extensions.

Joshua.

---------------------------------------------------------------------
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


Re: [users@httpd] DefaultType text/plain?

Posted by Vi <vi...@bexout.com>.
Can't I configure apache so that whenever it doesn't know the type, it 
sends error (for example 404 :))?
I mean, if I put file heh.blah, and apache is requested to return it, it 
returns text/html with contents of an
error.

Joshua Slive wrote:

>On Mon, 15 Mar 2004, Vi wrote:
>
>  
>
>>Hi, in my httpd.conf I have: DefaultType text/plain
>>Is it possible to enter such value so that it will alway return nothing
>>if it doesn't know type?
>>So for example if my php configuration for some reason fails, it won't
>>show the sources?
>>Maybe DefaultType none ?
>>    
>>
>
>No, you can't do DefaultType None, although there is an outstanding bug
>report requesting this functionality.
>
>But it wouldn't help you in any case.  Regardless of the Content-Type,
>browsers can always get at your source code if you send it.  They just
>need to save it and open it separately.
>
>Joshua.
>
>---------------------------------------------------------------------
>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


Re: [users@httpd] DefaultType text/plain?

Posted by Joshua Slive <jo...@slive.ca>.
On Mon, 15 Mar 2004, Vi wrote:

> Hi, in my httpd.conf I have: DefaultType text/plain
> Is it possible to enter such value so that it will alway return nothing
> if it doesn't know type?
> So for example if my php configuration for some reason fails, it won't
> show the sources?
> Maybe DefaultType none ?

No, you can't do DefaultType None, although there is an outstanding bug
report requesting this functionality.

But it wouldn't help you in any case.  Regardless of the Content-Type,
browsers can always get at your source code if you send it.  They just
need to save it and open it separately.

Joshua.

---------------------------------------------------------------------
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