There are several folders on a VPS, each is a separate site, and accordingly a separate address. But still, referring to the php file located one level lower, you have to set the address, starting not from the folder where the site is, but from the root of the VPS (var / html / ..).
How to fix?
There is another strange point that I can not yet explain: In the folder there are js files that I address at the address of the form /file.js. If this folder is assigned an address, the js files function, but if the address is not set, opening the site in the folder by IP, the site cannot find these js files. Explain?