500 Internal Server Error After Editing config.php

Everything was working with this kind of URL ( with custom port # ) in WSL2, SuiteCRM v. 8.1.2:
Then I was trying to fix this problem - Fix URL to point to correct host IP.
And I did replace localhost for www.website.dom:8087 in \var\www\crm\public\legacy\config.php:
‘site_url’ => ‘http://www.website.dom:8087’,

And now I’m getting this error for either previous or new value for ‘site_url’:

Oops! An Error Occurred

The server returned a “500 Internal Server Error”.

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

How to fix it, please.

Also have this error inside Apache log:
[Thu Aug 03 14:43:11.593422 2023] [php7:error] [pid 652] [client] PHP Fatal error: require_once(): Failed opening required ‘/var/www/crm/public/legacy/config.php’ (include_path=‘/var/www/crm/public/legacy/include/…:.:/usr/share/php’) in /var/www/crm/public/legacy/include/entryPoint.php on line 77

And it probably related to different file permission settings under WSL2. What it should be for ‘/var/www/crm/public/legacy/config.php’ ? 777?

Thank you!

Did 2 things and website is now back online, thanks.

  1. created /etc/wsl.conf:

Restarted WSL

  1. Changed permission to 777:
    wsl sudo chmod -R 777 /var/www/crm/public/legacy/config.php