Published 3 months ago
Published 3 months ago
Braga aka Sl1mJ0e
Updated 3 months ago
0
Hey Guys,
Hope you doing well!
I'm trying to implement SafeLine WAF to protect WordPress sites hosted on CloudPanel, but I'm getting a "Bad Gateway" (clouflare) when accessing my site.
My Setup
Configuration
I've set up SafeLine with:
My Nginx is configured to route all traffic through SafeLine first:
nginx
location / {
proxy_pass http://127.0.0.1:4435;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_hide_header X-Varnish;
proxy_redirect off;
proxy_max_temp_file_size 0;
proxy_connect_timeout 720;
proxy_send_timeout 720;
proxy_read_timeout 720;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
}
What I've Tried
Any ideas why im getting this error and how can i fix it?
The same setup is working for other services hosted in the same server (like containers).
Braga aka Sl1mJ0e
Updated 3 months ago
0
SafeLine WAF Bad Gateway Error with WordPress Sites
𝒁𝒆𝒓𝒐 𝑻𝒘𝒐
Updated 3 months ago
0
Maybe i'm wrong, but if your upstream is 127.0.0.1:8080... why do you have in proxy_pass http://127.0.0.1:4435 ??
Braga aka Sl1mJ0e
Updated 3 months ago
The upstream points to the real service port.
In the wordpress nginx we use the safeline port that we choose when we were creating the "Application".
Its already fixed, the problem was the proxy_http_version