How to Change the Session Time in Virtualizor Via the SSH Shell Command Line

If you find your self stuck on the login screen without the ability to signin for your Virtualizor master server and the slave servers due to mistakenly setting the 'Session Timeout' to 0 (zero) found under 'General Settings' on the Master Configuration page of Virtualizor, then you can perform the following to change the 'Session Timeout' back to the default of 3000 or to any other timeframe you would like.

Follow these simple steps:

  1. 1. SSH your master server using Putty, WinSCP or other
  2. 2. Edit the universal.php file on the master server. Note:- Please take a backup of the universal.php file before making any changes vi /usr/local/virtualizor/universal.php or nano /usr/local/virtualizor/universal.php or use WinSCP browser to navigate to /usr/local/virtualizor/ and then select universal.php and edit the file.
  3. 3. Find the line $globals['sess_len'] = 0;
  4. 4. Change the line $globals['sess_len'] = 0; to $globals['sess_len'] = 3600; or other number that suits your needs.

Please note that there is no unlimited number you can use. If you need or want a longer session time, just use a higher value than you were previously using.

Also, the higher the value you use, meaning the longer your session stays open, then there could be security implications if someone access your devive or PC when you are away from it.


Was this article helpful?

mood_bad Dislike 0
mood Like 1
visibility Views: 48