Run index.php before installation -> HTTP Error 500

Hi, after unzip or run setup-nextcloud.php HTTP Error 500.
SSH Output after called :
xxx> php index.php
Status: 500 Internal Server Error
X-Powered-By: PHP/7.3.15
Content-Type: text/plain; charset=utf-8

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the webserver log.
PHP Fatal error: Uncaught TypeError: Return value of OC\AppFramework\Http\Request::getScriptName() must be of the type string, null returned in /mnt/web410/b0/90/xxx/htdocs/xxx/cloud/lib/private/AppFramework/Http/Request.php:836
Stack trace:
#0 /mnt/web410/b0/90/xxx/htdocs/xxx/cloud/lib/base.php(159): OC\AppFramework\Http\Request->getScriptName()
#1 /mnt/web410/b0/90/xxx/htdocs/xxx/cloud/lib/base.php(582): OC::initPaths()
#2 /mnt/web410/b0/90/xxx/htdocs/xxx/cloud/lib/base.php(1089): OC::init()
#3 /mnt/web410/b0/90/xxx/htdocs/xxx/cloud/index.php(36): require_once(’/mnt/web410/b0/…’)
#4 {main}
thrown in /mnt/web410/b0/90/xxx/htdocs/xxx/cloud/lib/private/AppFramework/Http/Request.php on line 836

The directory of Nextcloud looks like:

I use PHP 7.3. I hope anyone can help me. Thanks.


Is β€œpower” the user the Webserver runs with? If not, you may need to chown the Nextcloud-webroot to match the specific user - could work.