You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Vects <al...@actcom.co.il> on 2006/04/24 17:28:36 UTC

[users@httpd] png images are broken with reverse proxy

Hi there,
I have a problem with mod_proxy, png images are broken. I found that
apache removes '\n\r' (hex 0a0d) from png files. Is there anyway to
prevent apache to do that or I need to fix png files?

Thanks, Alexc.


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


[users@httpd] Re: png images are broken with reverse proxy

Posted by Vects <al...@actcom.co.il>.
On Tue, 2006-04-25 at 16:40 +0200, Joost de Heer wrote: 
> Vects wrote:
> > Hi there,
> > I have a problem with mod_proxy, png images are broken. I found that
> > apache removes '\n\r' (hex 0a0d) from png files. Is there anyway to
> > prevent apache to do that or I need to fix png files?
> 
> Do you use output filters?
it's default configuration, there's only one output filter for  shtml

httpd.conf:
AddOutputFilter INCLUDES .shtml


Thanks, Alexc.

> 
> Joost
> 


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


[users@httpd] Re: png images are broken with reverse proxy

Posted by Joost de Heer <sa...@xs4all.nl>.
Vects wrote:
> Hi there,
> I have a problem with mod_proxy, png images are broken. I found that
> apache removes '\n\r' (hex 0a0d) from png files. Is there anyway to
> prevent apache to do that or I need to fix png files?

Do you use output filters?

Joost


---------------------------------------------------------------------
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 images are broken with reverse proxy

Posted by Vects <al...@actcom.co.il>.
Sorry for delay, I was out of office.
On Wed, 2006-04-26 at 13:56 +0200, Joost de Heer wrote:
> > <VirtualHost *:80>
> >     ServerAdmin webmaster@mydomain
> >     DocumentRoot  /var/www/html/
> >     ServerName mydomain
> >     <IfModule mod_proxy.c>
> >     ProxyRequests off
> >     <Proxy *>
> >        Order deny,allow
> >        Deny from all
> >        Allow from 192.168.80.0/25
> >     </Proxy>
> 
> Why have a <Proxy> block if you have 'ProxyRequests off'?
I want to restrict access to proxy.

> 
> >     ProxyPass / http://192.168.3.1/
> >     ProxyPassReverse / http://192.168.3.1/
> >   </IfModule>
> > </VirtualHost>
> 
> - Which proxy modules do you load/are statically linked in the binary?
Server version: Apache/2.0.53
Server built:   Sep  5 2005 09:28:47

Compiled in modules:
  core.c
  prefork.c
  http_core.c
  mod_so.c

all other modules are compiled dynamically 

LoadModule proxy_module modules/mod_proxy.so
LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule auth_ldap_module modules/mod_auth_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
oadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so


> - Is there anything in the errorlog for this request?
nothing special.

> - Does the backend application send the file as application/x-png (or
> whatever the MIME type of a PNG image is)?
it's 'Content-Type: image/x-png.'


Thanks, Alexc

> 
> Joost
> 


---------------------------------------------------------------------
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 images are broken with reverse proxy

Posted by Joost de Heer <sa...@xs4all.nl>.
> <VirtualHost *:80>
>     ServerAdmin webmaster@mydomain
>     DocumentRoot  /var/www/html/
>     ServerName mydomain
>     <IfModule mod_proxy.c>
>     ProxyRequests off
>     <Proxy *>
>        Order deny,allow
>        Deny from all
>        Allow from 192.168.80.0/25
>     </Proxy>

Why have a <Proxy> block if you have 'ProxyRequests off'?

>     ProxyPass / http://192.168.3.1/
>     ProxyPassReverse / http://192.168.3.1/
>   </IfModule>
> </VirtualHost>

- Which proxy modules do you load/are statically linked in the binary?
- Is there anything in the errorlog for this request?
- Does the backend application send the file as application/x-png (or
whatever the MIME type of a PNG image is)?

Joost


---------------------------------------------------------------------
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 images are broken with reverse proxy

Posted by Vects <al...@actcom.co.il>.
On Mon, 2006-04-24 at 17:25 -0400, Joshua Slive wrote:
> On 4/24/06, Vects <al...@actcom.co.il> wrote:
> > Hi there,
> > I have a problem with mod_proxy, png images are broken. I found that
> > apache removes '\n\r' (hex 0a0d) from png files. Is there anyway to
> > prevent apache to do that or I need to fix png files?
> 
> Apache does not, by default, change any content on proxied requests. 
> Perhaps if you gave more details about apache version and any other
> modules in use, someone might have ideas on what is going on.
actually it's FC5, httpd-2.2.0-5.1.2. the config file is standard.

<VirtualHost *:80>
    ServerAdmin webmaster@mydomain
    DocumentRoot  /var/www/html/
    ServerName mydomain
    <IfModule mod_proxy.c>
    ProxyRequests off
    <Proxy *>
       Order deny,allow
       Deny from all
       Allow from 192.168.80.0/25
    </Proxy>
    ProxyPass / http://192.168.3.1/
    ProxyPassReverse / http://192.168.3.1/
  </IfModule>
</VirtualHost>

Firefox gives me 'The image “http://192.168.80.82/clear.png” cannot be
displayed, because it contains errors.'

Thanks, Alexc


> 
> 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] png images are broken with reverse proxy

Posted by Joshua Slive <jo...@slive.ca>.
On 4/24/06, Vects <al...@actcom.co.il> wrote:
> Hi there,
> I have a problem with mod_proxy, png images are broken. I found that
> apache removes '\n\r' (hex 0a0d) from png files. Is there anyway to
> prevent apache to do that or I need to fix png files?

Apache does not, by default, change any content on proxied requests. 
Perhaps if you gave more details about apache version and any other
modules in use, someone might have ideas on what is going on.

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