Internal access is fine, external not so much

Brand new Nextcloud 13.0.4 install (and new to nextcloud in general).

OVA install on ESXI.
subdomain (cloud.domain.org) pointed at the server
port forwarded 80 and 443

Everything is up and running.

Accessing from internal ip address (192.168.1.xx) works perfectly
Accessing from public IP address gives me an “access through untrusted domain” error
Accessing from subdomain gives PHP error.

" * Your webserver seems to be not configured to use PHP or PHP is not installed.

require_once DIR . ‘/lib/versioncheck.php’;

try {

require_once __DIR__ . '/lib/base.php';

OC::handleRequest();

} catch(\OC\ServiceUnavailableException $ex) {
\OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’));

//show the user a detailed error page
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
OC_Template::printExceptionErrorPage($ex);

} catch (\OC\HintException $ex) {
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
try {
OC_Template::printErrorPage($ex->getMessage(), $ex->getHint());
} catch (Exception $ex2) {
\OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’));
\OC::$server->getLogger()->logException($ex2, array(‘app’ => ‘index’));

	//show the user a detailed error page
	OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
	OC_Template::printExceptionErrorPage($ex);
}

} catch (\OC\User\LoginException $ex) {
OC_Response::setStatus(OC_Response::STATUS_FORBIDDEN);
OC_Template::printErrorPage($ex->getMessage(), $ex->getMessage());
} catch (Exception $ex) {
\OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’));

//show the user a detailed error page
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
OC_Template::printExceptionErrorPage($ex);

} catch (Error $ex) {
try {
\OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’));
} catch (Error $e) {

	$claimedProtocol = strtoupper($_SERVER['SERVER_PROTOCOL']);
	$validProtocols = [
		'HTTP/1.0',
		'HTTP/1.1',
		'HTTP/2',
	];
	$protocol = 'HTTP/1.1';
	if(in_array($claimedProtocol, $validProtocols, true)) {
		$protocol = $claimedProtocol;
	}
	header($protocol . ' 500 Internal Server Error');
	header('Content-Type: text/plain; charset=utf-8');
	print("Internal Server Error\n\n");
	print("The server encountered an internal error and was unable to complete your request.\n");
	print("Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.\n");
	print("More details can be found in the webserver log.\n");

	throw $e;
}
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
OC_Template::printExceptionErrorPage($ex);

Could you try to provide at least your config ! Ova on esxi, this is pretty useless.

Nginx or apache, php version, …

Seem your missing some dependencies.

do in ssh console:

- php -v

output should give someting like:

PHP 7.0.30-0+deb9u1 (cli) (built: Jun 14 2018 13:50:25) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.30-0+deb9u1, Copyright (c) 1999-2017, by Zend Technologies

and check you installed module:

php -m

here the list of my modules from a php7.0 on a debian9.5

[PHP Modules]
apc
apcu
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imagick
imap
intl
json
ldap
libsodium
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pgsql
Phar
posix
pspell
readline
recode
redis
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

PHP 7.0.27-0+deb9u1 (cli) (built: Jan 5 2018 13:51:52) ( NTS )

[PHP Modules]
calendar
Core
ctype
date
dom
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
krb5
ldap
libxml
mcrypt
memcache
openssl
pcntl
pcre
PDO
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib

[Zend Modules]

Still stuck…anyone?

Help? Please?

You need to give more information about what webbserver you are using including its config for the site.

Seems like you are not using correct config to enable php on your webserver.