You just need to configure your PhpStorm project correctly by specifying the include paths PhpStorm should use to resolve references.
Go to File -> Settings -> PHP.
There you should add the project root directory (the one where your index.php resides) to the list of include paths.
When this is done PhpStorm should resolve the path in require_once('private/module2.php')
.
Additionally you could add the private directory to the list of include paths PHP uses via set_include_path() somewhere in you index.php. Then you could just call require_once('module2.php')
from your module1.php.
Again, you would have to add the private directory to the list of include paths PhpStorm uses to enable it resolve this reference.