LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-04-2009, 07:04 AM   #1
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Rep: Reputation: 40
Apache: Making sure text files remain "unknown"


Hi.


I'm running Apache 2.2.3 and are using it to share files, i.e the users can browse my directories and files and view/download on demand. The files are plain linux text files. The files are prifexed with ".log".

For some reason some text files are recognized as text files and marked accordingly, but others are marked uknown. The latter is actually what I want. Is there a way to get Apache to treat all *.log files and unknown? I know that /etc/mime.types can be used to map it to some built in type, but I don't know how to make sure the files remain undefined/unmapped.


Regards,
kenneho
 
Old 03-04-2009, 09:02 AM   #2
swiftbiggy
LQ Newbie
 
Registered: Feb 2009
Posts: 2

Rep: Reputation: 0
Hi,

Not entirely sure but i think that you can do it by defining the .log extention as being of type application/octet-stream like this:


AddType application/octet-stream .log

within your apache2.conf or other config file.

This should ensure that the client browser doesnt recognise (and automatically display) the text content but instead prompts the user to download it instead.


1st post here - sorry if it is inaccurate or not what you were looking for
 
Old 03-04-2009, 09:34 AM   #3
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Original Poster
Rep: Reputation: 40
Thanks, I'll check it out!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Socket Programming making use of "select()" and "writefds" johncsl82 Programming 10 11-13-2011 12:27 PM
Courious "unknown" entries in "netstat" output Sheridan Linux - Networking 5 09-01-2009 09:09 AM
"Unknown Partition Table Signature" error when making a grub boot floppy ? uncle-c Linux - General 2 02-02-2008 05:29 AM
shell scripting: "formatting" issue with text files eur0dad Programming 3 08-17-2006 10:50 AM
"X-MS" cant open because "x-Multimedia System" cant access files at "smb&qu ponchy5 Linux - Networking 0 03-29-2004 11:18 PM


All times are GMT -5. The time now is 02:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration