Switch to vesta port if it connection came via nginx proxy

This commit is contained in:
myvesta 2019-09-25 15:51:21 +02:00 committed by GitHub
commit 54908c53d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,10 @@
<?php
if (file_exists("/usr/local/vesta/web/inc/switch_to_vesta_port") && isset($_SERVER['HTTP_X_REAL_IP'])) {
header("Location: https://".$_SERVER['HTTP_HOST'].":".$_SERVER['SERVER_PORT']);
exit;
}
session_start();
define('VESTA_CMD', '/usr/bin/sudo /usr/local/vesta/bin/');