-
Notifications
You must be signed in to change notification settings - Fork 37
Getting Started
Edit diskover-web settings in src/diskover/Constants.php
.
<?php
namespace diskover;
class Constants {
// diskover-web version
const VERSION = '1.4.0';
// set to your Elasticsearch host or ip
const ES_HOST = 'localhost';
// set to your Elasticsearch port, default 9200
const ES_PORT = 9200;
// set following two lines if using X-Pack http-auth
const ES_USER = '';
const ES_PASS = '';
// set to true if using AWS
const AWS = false;
// diskover.py socket listener
const SOCKET_LISTENER_HOST = '127.0.0.1';
const SOCKET_LISTENER_PORT = 9999;
// additional custom ES fields to display in search results
const EXTRA_FIELDS = ""; // ['md5_checksum' => 'MD5 Checksum']
// default min file size (bytes) filter
const FILTER = 1;
// default mtime filter
const MTIME = 0;
// default maxdepth filter
const MAXDEPTH = 2;
// default don't use count (use size)
const USE_COUNT = 0;
}
Create index.php symlink.
$ cd public
$ ln -s dashboard.php index.php
Start diskover web using PHP's built-in web server.
$ cd public
$ php -S <IP>:8000
By default diskover web will communicate with the Elasticsearch API at http://<ES_HOST>:9200
. If you are running ES on a different port than default 9200, you will need to change config file or pass this information to diskover web when starting it up via an environment variable:
$ APP_ES_PORT=<PORT> php -S <IP>:8000
You can also change the index(s) used this way:
$ APP_ES_INDEX=<INDEX> php -S <IP>:8000
APP_ES_INDEX2 for index2.
If no indices are set as args, you will have the option to pick your indices when you open the dashboard page. You can change your indices after on the Admin page or by removing diskover cookies.
Open your web browser and visit http://<IP>:8000
. Cookies are required.