Skip to main content

Quick Tip: Local Development with Opera, Nginx 502 error

By Bruno Skvorc

This doesn’t apply to you if you’re using Apache to do local development

I was doing some local dev work recently, but for the first time in my “new” browser – Opera. I set up my Homestead Improved instance and its virtual hosts as usual, but then couldn’t get anything other than a 502 error to show up:

Screenshot 2016-06-04 17.23.37

If you inspect the dev tools, you’ll notice the status is 502 – typical of an Nginx bad gateway error.

I then spent around 30 minutes starting at dead empty error logs in my VM, and re-checking the PHP socket and ports, until it hit me that I was looking in the wrong place:

Screenshot 2016-06-04 17.23.44

Opera has VPN on by default in the version that’s current at the time of this writing, and when you try to visit a valid TLD (.com, .app, .dev, etc) with the VPN on, it crashes. The error you see is the one from Opera’s VPN which is, incidentally, running Nginx.

To solve the issue, all one has to do is turn off the VPN during local development and it’ll work.

Hope this helped someone avoid more unnecessary log hunting.

Bruno is a blockchain developer and technical educator at the Web3 Foundation, the foundation that's building the next generation of the free people's internet. He runs two newsletters you should subscribe to if you're interested in Web3.0: Dot Leap covers ecosystem and tech development of Web3, and NFT Review covers the evolution of the non-fungible token (digital collectibles) ecosystem inside this emerging new web. His current passion project is, the most advanced NFT system in the world, which allows NFTs to own other NFTs, NFTs to react to emotion, NFTs to be governed democratically, and NFTs to be multiple things at once.

Integromat Tower Ad