You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Bruce Douglas <be...@earthlink.net> on 2003/01/23 18:52:09 UTC

[users@httpd] PNG / Apache question...

Hi...

Curious.. I have a graphics file. It's in the PNG format. How do I serve the
file using Apache such that it is displayed properly using a netscape/ie
browser.....

Out of curiousity, I tried to simply "look" at the file using a regular
browser... it didn't work!!

With a regular .bmp/gif there's no issue. Is there some attribute within the
Apache Server that does an on the fly convert....

Any help/assistance would be helpful!!

thanks

-bruce
bedouglas@earthlink.net

PS. I'm using Apache 2.0.40 on Linux Redhat 8.0


-----Original Message-----
From: docadmin@ua.fm [mailto:docadmin@ua.fm]
Sent: Thursday, January 23, 2003 9:42 AM
To: users@httpd.apache.org
Subject: [users@httpd] Apache 2.0.43 vs CGI


Hello,

We have upgraded Apache from 1.3 to 2.0.43 and now experience such a
problem: when submitting parameters via / (for example,
http://www.mydomain.com/?asd=dsa) we have 403 error and error_log says
"Attempt to invoke directory as script". Please, advise.

Exerpt from httpd.conf:
...
<VirtualHost www.mydomain.com:80>
        ServerAdmin hostmaster@www.mydomain.com
        DocumentRoot /home/www/www.mydomain.com/htdocs
        ScriptAlias /cgi-bin/ /home/www/www.mydomain.com/cgi-bin/
        ServerName www.mydomain.com
        Alias /images/ /home/www/www.mydomain.com/images/
        Alias /pictures/ /home/www/www.mydomain.com/upload/
        Alias /errors/ /home/www/www.mydomain.com/errors/
        Alias /catalog/ /home/www/www.mydomain.com/catalog/
        ErrorLog /home/www/www.mydomain.com/logs/error_log
        CustomLog /home/www/www.mydomain.com/logs/access_log combined
        ScriptLog /home/www/www.mydomain.com/logs/script_log
        ErrorDocument 403 /errors/403.html
        ErrorDocument 404 /errors/404.html
        ErrorDocument 500 /errors/500.html
</VirtualHost>
<Directory /home/www/www.mydomain.com/htdocs>
        Options ExecCGI
        AllowOverride All
        SetHandler cgi-script
        DirectoryIndex index.cgi
</Directory>
...

Thank you very much in advance. Any help would be greatly appreciated.

--
Best regards,
 docadmin                          mailto:docadmin@ua.fm



---------------------------------------------------------------------
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] PNG / Apache question...

Posted by Jacob Coby <jc...@listingbook.com>.
> Curious.. I have a graphics file. It's in the PNG format. How do I serve
the
> file using Apache such that it is displayed properly using a netscape/ie
> browser.....
>
> Out of curiousity, I tried to simply "look" at the file using a regular
> browser... it didn't work!!
>
> With a regular .bmp/gif there's no issue. Is there some attribute within
the
> Apache Server that does an on the fly convert....

Hmm, weird, I've had no problems with the default install settings in both
1.3 and 2.0.

Try this:

telnet yoursite 80
HEAD /images/yourpng.png HTTP/1.0
[enter][enter]

You should see something like:

[jcoby@theserver]$ telnet theserver 80
Trying 123.123.123.123...
Connected to theserver.
Escape character is '^]'.
HEAD /images/search.png HTTP/1.0

HTTP/1.1 200 OK
Date: Thu, 23 Jan 2003 18:17:13 GMT
Server: Apache/1.3.27 (Unix) PHP/4.2.3 mod_ssl/2.8.11 OpenSSL/0.9.6g
Last-Modified: Wed, 22 Jan 2003 20:59:51 GMT
ETag: "533ce-e5-3e2f0647"
Accept-Ranges: bytes
Content-Length: 229
Connection: close
Content-Type: image/png

Connection closed by foreign host.

That Content-Type is an authorative description of what kind of data its
serving (well, except on IE, it doesn't follow the rules).  You can change
Content-Type with MIME types.  If you /do/ see image/png, your browser is
borked or broken.

-Jacob


---------------------------------------------------------------------
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] PNG / Apache question...

Posted by Bruce Douglas <be...@earthlink.net>.
Chris...

I'm using Apache 2.0.40 on Linux Redhat 8.0. I looked through the httpd.conf
file.. didn't see anything regarding images... should i actually add a line
"AddType image/png .png"

thanks

-bruce

-----Original Message-----
From: Chris Taylor [mailto:chris@x-bb.org]
Sent: Thursday, January 23, 2003 10:12 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] PNG / Apache question...


http://httpd.apache.org/docs-2.0/mod/mod_mime.html

Can't say I've ever had a problem serving PNGs without resorting to changing
the default config though, what version of Apache are you running?

Chris Taylor - chris@x-bb.org - The guy with the PS2 WebServer -
http://www.x-bb.org/chris.asc

----- Original Message -----
From: "Bruce Douglas" <be...@earthlink.net>
To: <us...@httpd.apache.org>
Sent: Thursday, January 23, 2003 5:52 PM
Subject: [users@httpd] PNG / Apache question...


> Hi...
>
> Curious.. I have a graphics file. It's in the PNG format. How do I serve
the
> file using Apache such that it is displayed properly using a netscape/ie
> browser.....
>
> Out of curiousity, I tried to simply "look" at the file using a regular
> browser... it didn't work!!
>
> With a regular .bmp/gif there's no issue. Is there some attribute within
the
> Apache Server that does an on the fly convert....
>
> Any help/assistance would be helpful!!
>
> thanks
>
> -bruce
> bedouglas@earthlink.net
>
> PS. I'm using Apache 2.0.40 on Linux Redhat 8.0
>
>
> -----Original Message-----
> From: docadmin@ua.fm [mailto:docadmin@ua.fm]
> Sent: Thursday, January 23, 2003 9:42 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] Apache 2.0.43 vs CGI
>
>
> Hello,
>
> We have upgraded Apache from 1.3 to 2.0.43 and now experience such a
> problem: when submitting parameters via / (for example,
> http://www.mydomain.com/?asd=dsa) we have 403 error and error_log says
> "Attempt to invoke directory as script". Please, advise.
>
> Exerpt from httpd.conf:
> ...
> <VirtualHost www.mydomain.com:80>
>         ServerAdmin hostmaster@www.mydomain.com
>         DocumentRoot /home/www/www.mydomain.com/htdocs
>         ScriptAlias /cgi-bin/ /home/www/www.mydomain.com/cgi-bin/
>         ServerName www.mydomain.com
>         Alias /images/ /home/www/www.mydomain.com/images/
>         Alias /pictures/ /home/www/www.mydomain.com/upload/
>         Alias /errors/ /home/www/www.mydomain.com/errors/
>         Alias /catalog/ /home/www/www.mydomain.com/catalog/
>         ErrorLog /home/www/www.mydomain.com/logs/error_log
>         CustomLog /home/www/www.mydomain.com/logs/access_log combined
>         ScriptLog /home/www/www.mydomain.com/logs/script_log
>         ErrorDocument 403 /errors/403.html
>         ErrorDocument 404 /errors/404.html
>         ErrorDocument 500 /errors/500.html
> </VirtualHost>
> <Directory /home/www/www.mydomain.com/htdocs>
>         Options ExecCGI
>         AllowOverride All
>         SetHandler cgi-script
>         DirectoryIndex index.cgi
> </Directory>
> ...
>
> Thank you very much in advance. Any help would be greatly appreciated.
>
> --
> Best regards,
>  docadmin                          mailto:docadmin@ua.fm
>
>
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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] PNG / Apache question...

Posted by Chris Taylor <ch...@x-bb.org>.
http://httpd.apache.org/docs-2.0/mod/mod_mime.html

Can't say I've ever had a problem serving PNGs without resorting to changing
the default config though, what version of Apache are you running?

Chris Taylor - chris@x-bb.org - The guy with the PS2 WebServer -
http://www.x-bb.org/chris.asc

----- Original Message -----
From: "Bruce Douglas" <be...@earthlink.net>
To: <us...@httpd.apache.org>
Sent: Thursday, January 23, 2003 5:52 PM
Subject: [users@httpd] PNG / Apache question...


> Hi...
>
> Curious.. I have a graphics file. It's in the PNG format. How do I serve
the
> file using Apache such that it is displayed properly using a netscape/ie
> browser.....
>
> Out of curiousity, I tried to simply "look" at the file using a regular
> browser... it didn't work!!
>
> With a regular .bmp/gif there's no issue. Is there some attribute within
the
> Apache Server that does an on the fly convert....
>
> Any help/assistance would be helpful!!
>
> thanks
>
> -bruce
> bedouglas@earthlink.net
>
> PS. I'm using Apache 2.0.40 on Linux Redhat 8.0
>
>
> -----Original Message-----
> From: docadmin@ua.fm [mailto:docadmin@ua.fm]
> Sent: Thursday, January 23, 2003 9:42 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] Apache 2.0.43 vs CGI
>
>
> Hello,
>
> We have upgraded Apache from 1.3 to 2.0.43 and now experience such a
> problem: when submitting parameters via / (for example,
> http://www.mydomain.com/?asd=dsa) we have 403 error and error_log says
> "Attempt to invoke directory as script". Please, advise.
>
> Exerpt from httpd.conf:
> ...
> <VirtualHost www.mydomain.com:80>
>         ServerAdmin hostmaster@www.mydomain.com
>         DocumentRoot /home/www/www.mydomain.com/htdocs
>         ScriptAlias /cgi-bin/ /home/www/www.mydomain.com/cgi-bin/
>         ServerName www.mydomain.com
>         Alias /images/ /home/www/www.mydomain.com/images/
>         Alias /pictures/ /home/www/www.mydomain.com/upload/
>         Alias /errors/ /home/www/www.mydomain.com/errors/
>         Alias /catalog/ /home/www/www.mydomain.com/catalog/
>         ErrorLog /home/www/www.mydomain.com/logs/error_log
>         CustomLog /home/www/www.mydomain.com/logs/access_log combined
>         ScriptLog /home/www/www.mydomain.com/logs/script_log
>         ErrorDocument 403 /errors/403.html
>         ErrorDocument 404 /errors/404.html
>         ErrorDocument 500 /errors/500.html
> </VirtualHost>
> <Directory /home/www/www.mydomain.com/htdocs>
>         Options ExecCGI
>         AllowOverride All
>         SetHandler cgi-script
>         DirectoryIndex index.cgi
> </Directory>
> ...
>
> Thank you very much in advance. Any help would be greatly appreciated.
>
> --
> Best regards,
>  docadmin                          mailto:docadmin@ua.fm
>
>
>
> ---------------------------------------------------------------------
> 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
>


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