summaryrefslogtreecommitdiffhomepage
path: root/debian/README.Debian
blob: 312d00ce1e6edc79678ba4b24494524fb3a529f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
webbox for Debian
=================

This package is implemented as a FastCGI application in Apache.

After installing this package and its dependencies, the following
directories are relevant:

* Webbox FCGI Application directory: /usr/lib/webbox

* Webbox HTML directory: /var/www/webbox

  This directory is part of the webbox package and contains all static
  contents to be served by apache as web UI interface of webbox.

  In an Apache configuration, this directory is specified as
  DocumentRoot or Alias.

* Webbox directory(s): e.g. /home/webbox

  This directory or directories contain the actual contents to be served.
  It can be specified multiple times in an Apache configuration to
  implement several webboxes in one server.

  The contained files need to be owned by the www-data user.

  This directory is specified via the WEBBOX_PATH environment variable.


File browser
------------

The file browser can be used via the URL

http://<servername>/<path>

where servername is the host name served as VirtualHost by Apache
and <path> is the Alias configured in the Apache configuration for
the actual files (or DocumentRoot if no <path> component is
required).

All files readable by the user www-data are served, except for
hidden files (i.e. beginning with a ".").


Environment Variables
---------------------

The following environment variables are supported:

WEBBOX_PATH <path>

  Directory with the payload files to be served by a webbox.

WEBBOX_NAME <title>

  Title of the webbox. Will be written on top of the Web UI.

WEBBOX_READONLY On|Off

  If present and set to On, the whole webbox will not provide write/changes
  to the contents of the box.


Authentication
--------------

Webbox internally uses HTTP Auth for Authentication. E.g., Apache can
be configured like this:

        <Directory "/usr/lib/webbox">

		...

                AuthType Basic
                AuthName "Webbox"
                AuthUserFile "/etc/apache2/sites-available/mysite.htpasswd"
                Require valid-user
        </Directory>

Add a login/password pair to the password file:

# htpasswd -c /etc/apache2/sites-available/mysite.htpasswd username

Only the FastCGI application needs to secured. The static pages in
/var/www/webbox should be accessible to the user for login purposes.


Example configuration for Apache
--------------------------------

The following configuration can be included (and adjusted) in an Apache
VirtualHost configuration:

	# Define the URL of the webbox served by the Apache server:
	# http://<servername>/testbox 
	Alias /testbox /var/www/webbox

	# Actual location of files to be served
	FcgidInitialEnv WEBBOX_PATH /home/testbox

	# Title of the Webbox
	FcgidInitialEnv WEBBOX_NAME Testbox

	# Maximum transfer size supported is defined by this Fcgid parameter.
	# Note that the actual filesize will be smaller due to different
	# encoding schemes
	FcgidMaxRequestLen 100000000

	# The following makes the FastCGI application part of Webbox available
	# to the user. The static HTML pages of webbox always access the
	# FastCGI part via http://<servername>/bin/
        ScriptAlias /bin/ /usr/lib/webbox/
        <Directory "/usr/lib/webbox">
		SetHandler fcgid-script

                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                
		AuthType Basic
                AuthName "Webbox"
                AuthUserFile "/etc/apache2/sites-available/mysite.htpasswd"
                Require valid-user
        </Directory>

Contact
-------

Reichwein IT <mail@reichwein.it>