# Some of my user cannot access my website

**URL:** <https://www.ruby-forum.com/t/some-of-my-user-cannot-access-my-website/218958>\
**Category:** NGINX\
**Created:** [April 17, 2012, 12:45pm UTC](https://www.ruby-forum.com/t/some-of-my-user-cannot-access-my-website/218958 "2012-04-17T12:45:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [April 17, 2012, 12:45pm UTC](https://www.ruby-forum.com/t/some-of-my-user-cannot-access-my-website/218958/1 "2012-04-17T12:45:41Z")

</div>

Hi guys, I need your help to help me identify a problem. I’m running an  
online marketplace here in Indonesia. Right now I have 1 mod perl server  
using apache and 1 nginx server as proxy. But some of my users complain  
they cannot access my website, [http://www.tokopedia.com](http://www.tokopedia.com). And I found out  
a fact that if they use mikrotik HttpProxy, they cannot access my  
website, but they can access other website.

If they use firefox, they found err message : Content Encoding Error  
If they use google chrome, they found err message :  
ERR\_INVALID\_CHUNKED\_ENCODING

Can you help me with this?

Posted at Nginx Forum:

> **[some of my user cannot access my website](https://forum.nginx.org/read.php?2,225421,225421#msg-225421)**
>
> Hi guys, I need your help to help me identify a problem. I'm running an online marketplace here in Indonesia. Right now I have 1 mod perl server using apache and 1 nginx server as proxy. But some of my users complain they cannot access my website,...

---

<div class="post-metadata">

**Author:** ![leontinus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/8baadc/32.png) [@leontinus](https://www.ruby-forum.com/u/leontinus)\
**Post date:** [April 17, 2012, 12:52pm UTC](https://www.ruby-forum.com/t/some-of-my-user-cannot-access-my-website/218958/2 "2012-04-17T12:52:30Z")

</div>

by the way here i put my website proxy configuration

#-- notice info  
error\_log /data/share/project/www-conf/logs/nginx.err.proxy.log;  
pid /data/share/project/www-conf/logs/nginx.proxy.pid;

user ngproxy tokopedia;  
worker\_processes 4;

events {  
worker\_connections 1024;  
}

http {  
include /share/project/www-conf/nginx/tkpmodperl1/mime.types;  
include /share/project/www-conf/nginx/deny.conf;

default\_type text/plain;  
sendfile on;  
keepalive\_timeout 5;

```
    set_real_ip_from 192.168.1.0/24;
    real_ip_header X-Forwarded-For;

```

gzip on;  
#gzip off;  
gzip\_types text/plain text/css application/x-javascript;  
gzip\_comp\_level 9;  
gzip\_proxied any;  
#gzip\_vary off;  
#charset ISO-8859-1;

charset UTF-8;  
source\_charset UTF-8;

#-------------------  
server {  
server\_name tokopedia;  
listen 80;  
proxy\_set\_header X-Forwarded-Host $host:$server\_port;  
proxy\_set\_header X-Forwarded-Server [www.tokopedia.com](http://www.tokopedia.com);  
proxy\_set\_header X-Forwarded-For $remote\_addr;  
proxy\_set\_header Host $host;  
proxy\_set\_header Accept-Encoding “”;  
proxy\_buffering on;  
proxy\_buffers 8 64k;

```
if ($http_user_agent ~* big.brother|crawl ){return 403;}
if ($http_user_agent = "" ){return 403;}

location /___pstatus {
  stub_status on;
  access_log off;
}

location /img/ {
  proxy_pass http://xxx.xxx.xxx.xxx/img/;
}

location ~* ^/(.*)\.(js|css)$ {
  proxy_pass http://xxx.xxx.xxx.xxx/$1.$2;
}

location / { proxy_pass http://xxx.xxx.xxx.xxx:888/; }

```

}

Posted at Nginx Forum:

> **[Re: some of my user cannot access my website](https://forum.nginx.org/read.php?2,225421,225422#msg-225422)**
>
> Hi guys, I need your help to help me identify a problem. I'm running an online marketplace here in Indonesia. Right now I have 1 mod perl server using apache and 1 nginx server as proxy. But some of my users complain they cannot access my website,...

---

<div class="post-metadata">

**Author:** ![leontinus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/8baadc/32.png) [@leontinus](https://www.ruby-forum.com/u/leontinus)\
**Post date:** [April 17, 2012, 2:41pm UTC](https://www.ruby-forum.com/t/some-of-my-user-cannot-access-my-website/218958/3 "2012-04-17T14:41:51Z")

</div>

Hello!

On Tue, Apr 17, 2012 at 06:44:48AM -0400, leontinus wrote:

> Can you help me with this?

The messages suggest there is something wrong with the proxy in  
question, most likely it fails to handle chunked encoding  
properly. You may try to disable use of chunked transfer encoding  
with

```
chunked_transfer_encoding off;

```

to see if it helps. Note though that it will also make keepalive  
connections impossible if Content-Length isn’t known. You may  
also try to disabling keepalive connections completely with

```
keepalive_timeout 0;

```

See here for details:

> **[Module ngx\_http\_core\_module](http://nginx.org/en/docs/http/ngx_http_core_module.html#chunked_transfer_encoding)**
>
> This directive appeared in version 1.11.8.

> **[Module ngx\_http\_core\_module](http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout)**
>
> This directive appeared in version 1.11.8.

Maxim D.

---

<div class="post-metadata">

**Author:** ![leontinus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/8baadc/32.png) [@leontinus](https://www.ruby-forum.com/u/leontinus)\
**Post date:** [April 17, 2012, 7:40pm UTC](https://www.ruby-forum.com/t/some-of-my-user-cannot-access-my-website/218958/4 "2012-04-17T19:40:33Z")

</div>

## Maxim D. Wrote:

> some of my users complain
> 
> > ERR\_INVALID\_CHUNKED\_ENCODING
> 
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)  
> Hi Maxim D.,

Thank you for these tips, I will try it and see if it help my user. I  
will update again soon I get the result.

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,225421,225441#msg-225441](http://forum.nginx.org/read.php?2,225421,225441#msg-225441)
