I was getting
Error 500 Internal Server Error
Internal Server Error
Guru Meditation:
XID: 549061798
So I just stopped varnish. Now I am getting:
502 Bad Gateway nginx
So I heard that 502 means that nginx is working fine, but Apache is not working fine. Is this the case? Because I copied the configs from another server where the website is working properly and changed the url so that it matches with the newer one.
Is it possible that it's nginx that's not reverse proxying properly or is it because I need to actually enable varnish for it to work?
These are the nginx configs:
server {
listen 175.35.85.95:80 ;
server_name staging.prod.com www.staging.prod.com preprod.staging.prod.com staging.prod.com ;
client_max_body_size 64M;
location / {
proxy_pass http://127.0.0.2:80;
proxy_buffers 8 2m;
proxy_buffer_size 12m;
proxy_busy_buffers_size 12m;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Port 80;
proxy_set_header Host $host;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
}
}
One thing I am wondering is why it's listening to "175.35.85.95:80" (not actual ip), but the server ip is different from that ip.
Can we rule out varnish and assume that it's not varnish and it's the Apache configs that's still problematic?