Built-in server error - 502 Bad Gateway
I have IntelliJ with PHP plugin installed. I configured its interpreter to the location of php.exe. I'm using XAMPP. What might cause it? And how to fix it?
I saw there's a way to use another HTTP server installed on the computer, but it requires the project to be located in the root web folder. Is there a way for IntelliJ to communicate with the server, and start it by itself, with a selected port, and root folder location (current location of the project perform the "open in browser" function)?
Please sign in to leave a comment.
Hi there,
>What might cause it?
PhpStorm's built-in web server has issue with processing POST requests -- this issue is still not fixed -- https://youtrack.jetbrains.com/issue/WEB-17317
>but it requires the project to be located in the root web folder
Nope. You may just configure your Apache -- the virtual host entry for that site so it will serve your files from any folder. I have never used XAMPP myself, but I would imagine that it would have some simple Control Panel that would allow to do such stuff with few clicks.
As an alternative -- if you do not wish to look into it (for whatever reason, e.g. "have no time", "do not need to know that", "it sounds too complicated for me" or something else) -- you may just setup automatic deployment and PhpStorm will copy files into another folder on file save.
Some links: