Adding web based file manager
Posted: Thu Aug 21, 2014 6:00 am
I have been wanting a file manager on Vesta for sometime now. So I have taken matters into my own hands.
Here is a how to setup navphp4.44 to manage files on your admin login.
**NOTE I was using CentOS 6.5 your file paths may need to be changed**
Tools used.
Filezilla
Notepad++
1.Patch your nav bar in your panel. Go to /usr/local/vesta/web/templates/admin and edit panel.html Add this on line 12 Save (you should now see "Nav PHP" on the top nav bar.)
2.Make a folder in /usr/local/vesta/web called navphp
3.Download and unzip navphp4.44 http://sourceforge.net/projects/navphp/ ... or%204.44/
4.Open config.php edit the following
Save
5.Delete index.php and rename windows.php to index.php
6.**DO NOT FORGET THIS STEP** this is for SSO of the panel if you do not do this step your manager will be open to the world.
Add the following at line 22 in index.php
Add the following at line 212
7.Upload your navphp4.44 to /usr/local/vesta/web/navphp
You should now have navphp installed on your server with a navbar link.
Here is a how to setup navphp4.44 to manage files on your admin login.
**NOTE I was using CentOS 6.5 your file paths may need to be changed**
Tools used.
Filezilla
Notepad++
1.Patch your nav bar in your panel. Go to /usr/local/vesta/web/templates/admin and edit panel.html Add this on line 12
Code: Select all
<a class="top-<?php if($TAB == 'NAVPHP' ) echo 'selected-' ?>link" href="/navphp/"> <?php print __('Nav PHP') ?> </a>
2.Make a folder in /usr/local/vesta/web called navphp
3.Download and unzip navphp4.44 http://sourceforge.net/projects/navphp/ ... or%204.44/
4.Open config.php edit the following
Code: Select all
//$homedir = $_SERVER['DOCUMENT_ROOT'];
$homedir = "/home";
# Default directory for single user. Use absolute path.
$enable_login = false;
5.Delete index.php and rename windows.php to index.php
6.**DO NOT FORGET THIS STEP** this is for SSO of the panel if you do not do this step your manager will be open to the world.
Add the following at line 22 in index.php
Code: Select all
// Init
error_reporting(NULL);
ob_start();
session_start();
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
if ($_SESSION['user'] == 'admin') {
Code: Select all
}
header("Location: /navphp/");
exit;
You should now have navphp installed on your server with a navbar link.