-5

I have try setup a simple reverse proxy server using CAddy for my basic laravel + apache2 app

it seems whenever there is 302 ( example, login >> home ), the browser will hang and i will get 504 ( gateway timeout ).. refreshing the webpage is instant.

i have read docs and AI ( obviously this days ) and they tell us that it comes to keepalive. i have disabled it in caddy config. but it still has the same problem

caddy : 2.11.1

config :

"handle": [
                                {
                                    "handler": "reverse_proxy",
                                    "load_balancing": {
                                        "selection_policy": {
                                            "policy": "round_robin"
                                        }
                                    },
                                    "transport": {
                                        "dial_timeout": "5s",
                                        "keep_alive": {
                                            "enabled": false
                                        },
                                        "protocol": "http",
                                        "response_header_timeout": "30s",
                                        "versions": [
                                            "1.1"
                                        ]
                                    },
                                    "upstreams": [
                                        {
                                            "dial": "x.x.x.x:80"
                                        }
                                    ]
                                }
                            ],

using one liner of caddy

sudo caddy reverse-proxy --from :80 --to x.x.x.x:80

works perfectly

1
  • ``` sudo caddy reverse-proxy --from domain.x.y:80 --to x.x.x.x:80 ``` will exhibits the same problem Commented 4 hours ago

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.