Localhost won't connect after converting to Nginx from Apache

Issue Summary

Home page runs ok locally from local instance. However, as soon as any other pages are attempted (e.g. - via button or menu), I get a localhost refused to connect (This site can’t be reached).

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?

Only after converting from Apache to Nginx. If I convert back to Apache it runs ok again. Brand new Nginx sites are fine. Brand new Apache sites are fine.

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    See comments above. Yes - brand new site in Apache or Nginx work fine. It’s only if I convert to Nginx.

Replication

Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!
I suspect it is likely my environment as this must have occurred (and worked before) on MANY sites. But I don’t know where to look in Nginx specifics related to Apache->>Nginx

System Details

  • Which version of Local is being used?
    6.3.0+5756

  • What Operating System (OS) and OS version is being used?

    • For example: macOS Catalina or Windows 10 Professional
      MacOS Catalina 10.15.7
  • Attach the Local Log. See this Help Doc for instructions on how to do so:

Security Reminder

Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

When the localhost refused to connect error message appears, it is likely because the port is not correctly configured. There are many situations that might trigger “This site can’t be reached localhost refused to connect.” error in Chrome browsers . In general, the problem may happens for failing on DNS lookup . DNS is that network address that translates the website name to its internet address. Most often it causes for not getting the internet connection or misconfigured internet or network settings. Another reason could be the firewall preventing Google Chrome to load the webpage. However, other reasons, such as insufficient permissions or the Apache web server not running properly might also cause the error. In order to fix this “connection” error, there are a few simple steps that you could apply, such as:

  • Clear your browser cache.
  • Reset your IP address & flush the DNS cache.
  • Check proxy settings.
  • Disable your firewall.

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