logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: net::ERR_INVALID_CHUNKED_ENCODING 200 (OK)
Author
cberger



Joined: 23 Jul 2019
Posts: 5
Location: Luxembourg

PostPosted: Tue 23 Jul '19 13:35    Post subject: net::ERR_INVALID_CHUNKED_ENCODING 200 (OK) Reply with quote

Good afternoon all,

I'm currently creating a brand new apache reverse proxy on apache 2.4.39 (the former one runs 2.2).
My config syntax is fine (double checked with -t), the proxy job is done by apache, the daemon is up and running, however I get "blank pages" displayed for some vhosts.

Troubleshooting actions :
Try to curl http(s)://theRemoteURL --> worked fine, so it's not due to ACLs
Checked apache's logs --> nothing related

When I display the web browser developper tools, I get this message :
net::ERR_INVALID_CHUNKED_ENCODING 200 (OK)

My server is running Solaris 11.4, and I have multiple vhosts configured.
Here's one of them :

Code:
<VirtualHost *:80>
    ProxyRequests off
    ProxyPreserveHost on
    ServerName MYSITE.TEST.COM
    Redirect permanent / https://MYSITE.TEST.COM/
</VirtualHost>

<VirtualHost *:443>
    ServerName MYSITE.TEST.COM
    ProxyPreserveHost on
    SSLEngine On
    SSLProtocol ALL -SSLv2 -SSLv3
    SSLCipherSuite ECDHE-RSA-AES256-SHA384:AES256-SHA256:!RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM;
    SSLHonorCipherOrder on
    Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
    <Proxy *>
        AddDefaultCharset Off
        Require all granted
    </Proxy>
    <Location /phpmyadmin>
        AddDefaultCharset Off
        Require ip 1.2.3.4
        Require ip 2.3.4.5
        Require ip 3.4.5.6
    </Location>
    ProxyPass /PJ !
    ProxyPass / http://THEWEBSERVER/
   
    ErrorLog "/etc/opt/csw/apache2/logs/error_MYSITE.TEST.COM_443.log"
    TransferLog "/etc/opt/csw/apache2/logs/access_MYSITE.TEST.COM.log"
    CustomLog "|/usr/bin/logger -t apache -i -p local6.notice" combined
</VirtualHost>


Any idea ?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 24 Jul '19 16:19    Post subject: Reply with quote

You may also check the syntax of the vhosts with -S

maybe you have to change the encoding using mod_proxy_html ProxyHTMLCharsetOut

https://httpd.apache.org/docs/2.4/mod/mod_proxy_html.html
Back to top
cberger



Joined: 23 Jul 2019
Posts: 5
Location: Luxembourg

PostPosted: Wed 24 Jul '19 16:35    Post subject: Reply with quote

Thanks for the -S information, I didn't know about this one!

When I run httpd -S, I get a list of the vhosts, ordered by port, and no warning / error.

I get this in the bottom :
Code:
ServerRoot: "/opt/csw"
Main DocumentRoot: "/var/opt/csw/apache2/htdocs"
Main ErrorLog: "/var/opt/csw/log/apache2/error_log"
Mutex ssl-stapling-refresh: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/etc/opt/csw/apache2/mutex" mechanism=default
Mutex watchdog-callback: using_defaults
Mutex proxy-balancer-shm: using_defaults
PidFile: "/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="daemon" id=1
Group: name="daemon" id=12


In a vhost, I've added the charset directive like ( see line 4):
Code:
<VirtualHost *:443>
    ServerName MYSITE.TEST.COM
    ProxyPreserveHost on
    ProxyHTMLCharsetOut *
    SSLEngine On
    SSLProtocol ALL -SSLv2 -SSLv3
    SSLCipherSuite ECDHE-RSA-AES256-SHA384:AES256-SHA256:!RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM;
    SSLHonorCipherOrder on
    Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
    <Proxy *>
        AddDefaultCharset Off
        Require all granted
    </Proxy>
    <Location /phpmyadmin>
        AddDefaultCharset Off
        Require ip 1.2.3.4
        Require ip 2.3.4.5
        Require ip 3.4.5.6
    </Location>
    ProxyPass /PJ !
    ProxyPass / http://THEWEBSERVER/
   
    ErrorLog "/etc/opt/csw/apache2/logs/error_MYSITE.TEST.COM_443.log"
    TransferLog "/etc/opt/csw/apache2/logs/access_MYSITE.TEST.COM.log"
    CustomLog "|/usr/bin/logger -t apache -i -p local6.notice" combined
</VirtualHost>


No change :\
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 30 Jul '19 8:44    Post subject: Reply with quote

With the development tools, can you see any content that is passed by apache?
Back to top
cberger



Joined: 23 Jul 2019
Posts: 5
Location: Luxembourg

PostPosted: Tue 30 Jul '19 14:05    Post subject: Reply with quote

James,

I just get this :

Back to top
cberger



Joined: 23 Jul 2019
Posts: 5
Location: Luxembourg

PostPosted: Wed 31 Jul '19 10:28    Post subject: Reply with quote

James,

I found a dirty fix.

In my apache 2.4 httpd.conf file, if I add this :
Code:
SetEnv downgrade-1.0 1
SetEnv force-response-1.0 1

then the pages are loaded normally

Before


After


It's clearly a dirty fix, but also an indication
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 31 Jul '19 14:27    Post subject: Reply with quote

Okay that is because of KeepAlive. Disabling that would do the trick.
Back to top
cberger



Joined: 23 Jul 2019
Posts: 5
Location: Luxembourg

PostPosted: Wed 31 Jul '19 15:25    Post subject: Reply with quote

I added KeepAlive=off, no change :\

Code:
ProxyPass / http://myServer/ keepalive=on
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 31 Jul '19 18:03    Post subject: Reply with quote

There is see KeepAlive=On

That is not what I meant. In the global Server config disable KeepAlive[1]


[1] https://httpd.apache.org/docs/2.4/en/mod/core.html#keepalive
Back to top


Reply to topic   Topic: net::ERR_INVALID_CHUNKED_ENCODING 200 (OK) View previous topic :: View next topic
Post new topic   Forum Index -> Apache