502 Bad Gateway

DiggingWebsites.com returns 502 Bad Gateway error message for days now
Can you help?

1 Like

Is the IP down? Seems to be the case

1 Like

I can lookup the url and see an IP, when I ping this IP there is no response, tracert stops after 5 steps without reaching the IP. Is it due to infinityfree service?

1 Like

Your account IP (185.27.134.171) is working, and everything looks correct on my end. What does your website contain? Also, note that pings will always fail, as the server is setup to block them.

1 Like

I checked your website and I believe the issue is somewhere in your WordPress site.

Opening a HTML file or other non-PHP file works fine, e.g. https://diggingwebsites.com/readme.html

I also created a small example PHP file and tried opening that, and it worked fine too.

One thing you could try is disabling all plugins and see if that allow you to access your site. This article describes how to do that:

3 Likes

How do you know an IP is working?
I tried isitdownrightnow.com and downforeveryoneorjustme.com - one of them said the website was down, the other one said it was up.
(Note that both say it’s up now)

1 Like

Thanks for the useful tip. So I disabled the plug-ins by renaming htdocs/wp-content/plugins as per your link however it didn’t help.
I then commented the following part in my htdocs/.htaccess:

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

And the site works again (without plugins, obviously), what’s wrong with the SSL forcing code above?

2 Likes

Maybe try this?

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https [OR]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
1 Like
#####################Redirect all http -> https
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Secrets!

I actually use the web interface for the Dig tool to find your IP, nameservers etc, then enter the IP in the browser. Since the servers are set up to block these things, an HTTP 403 response is returned. If that response is returned, the servers working. If an infinite load cycle occurs, it’s not.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.