LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   png images not served by apache ..??? (https://www.linuxquestions.org/questions/linux-software-2/png-images-not-served-by-apache-20561/)

gene_gEnie 05-09-2002 07:58 AM

png images not served by apache ..???
 
Hi,

I have a page that contains .png images. These display fine in Mozilla and Galeon when browsing the file locally. However when i try surf to the page, i.e. using the apache server on my box, the png's do not get displayed.

Do i have to add png support to httpd.conf ?

I would have thought that it was the browsers responsibility to deal with any 'stuff' that the server threw at it.

Anyone any ideas what i need to do to get me png's up n running? Cant see much about it on google.

Thanks

Martin

gene_gEnie 05-09-2002 08:27 AM

DOH!

wrong permissions

:o

Martin

Rashkae 05-10-2002 08:11 AM

Apache and mime Types
 
Not that it has anything to do with your png problem, but in regard to your comment about web server handling everythign that you throw at it. In truth, Apache has to identify the file type and sent a header with the file that will tell the client what the file is supposed to be. (Image, Application, Text, HTML.. etc etc)... All known filetypes and header names should be in a mime.types file in your apache config. The kicker, however, is that http.conf defaults to type text for any unknown file types. Newer browsers that trust the header will try to open binary files right in the browser window if Apache does not recognize the filetype. (This is a bad thing.)... There is also a 'magic' module for Apache that tries to determine the filetype from its contents.

For my purposes, I find it much more useful to change the default in httpd.conf to application/octet. (The instructions are well placed in the coments). That way, browsers don't try to open unknown filetypes, but instead offer to dowload them or open with an application of my choice.


All times are GMT -5. The time now is 03:35 AM.