mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 21:34:12 -07:00
Switch to vesta port if it connection came via nginx proxy
This commit is contained in:
parent
1b2d6959df
commit
54908c53d6
1 changed files with 5 additions and 0 deletions
|
@ -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/');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue