aboutsummaryrefslogtreecommitdiffstats
path: root/USAGE
blob: af6766b92dd9c57ece4b5b97acca823cbd7f4874 (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
Gomf usage
==========


Requirements
------------

	- Go1.5 or newer: https://golang.org/dl/

	- libmagic (on Debian/Ubuntu, `aptitude install libmagic-dev`)


Installation
------------

	- `go get -u git.clsr.net/gomf`

	- Go to a directory where you want to have the website files and `git clone https://git.clsr.net/gomf-web`


Running
-------

	- Go to the directory with gomf-web

	- Run `gomf`

	Optional options for `gomf`:
		--http HOST:PORT
			serves HTTP on HOST:PORT
			example: --http example.com:80

		--https HOST:PORT
			serves HTTPS on HOST:PORT
			needs --cert and --key
			example: --https example.com:443

		--cert PATH
			uses PATH as the TLS certificate for HTTPS
			example: --cert ssl/cert.pem

		--key PATH
			uses PATH as the TLS certificate key for HTTPS
			example: --key ssl/cert.key

		--hsts
			enables the HSTS header
			example: --hsts

		--name NAME
			sets website name to NAME
			example: --name Example

		--max-size BYTES
			sets BYTES as the upload file size limit in bytes
			example (10 MiB): --bytes 10485760
			equivalent bash example: --bytes $((1024 * 1024 * 10))

		--forbid-ext EXTS
			forbids file extensions contained in the comma-separated list EXTS
			example: --forbid-ext exe,dll,src

		--forbid-mime TYPES
			forbids MIME types contained in the comma-separated list TYPES
			example: --forbid-mime application/x-dosexec

		--contact EMAIL
			sets the contact email address to EMAIL
			example: --contact contact@example.com

		--abuse EMAIL
			sets the abuse email address to EMAIL
			example: --abuse abuse@example.com

		--upload-host HOST
			all request to HOST host will serve files directly ($host/$file, while other hosts serve them on $host/u/$file)
			example: --upload-host u.example.com

		--upload-url URL
			uses URL as the prefix for address of uploaded files
			example: --upload-url http://u.example.com/