502 Bad Gateway on Lubuntu 18.04

I'm running Lubuntu 18.02 and get this error when trying to preview a php file in chrome:


502 Bad Gateway

PhpStorm 2018.3.5



Phpstorm edition is 2018.3. PHP setting configured for 7.2 and 7.2 for "language level" and "cli"

owner@G700:~$ php --version
PHP 7.2.15-0ubuntu0.18.04.1 (cli) (built: Feb 8 2019 14:54:22) ( NTS )


1 comment
Comment actions Permalink

Are you trying to preview pages in built-in web server (localhost port 63342)?

Some requests served through built-in server are indeed end up with a 502 response (few examples: 1, 2). You might want to install a fully operational web server locally or remotely to preview live apps.


Please sign in to leave a comment.