-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.conf
67 lines (50 loc) · 1.22 KB
/
server.conf
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
[HOST]
host=127.0.0.1
[documentroot]
documentroot = './documentroot'
[MAX LENGTH OF REQUEST]
length = 1024
[MAX SIMULTANEOUS CONNECTION]
maxuser = 100 #worked with when i used 100 threads with it
[PROX]
prox = ['./documentroot/proxy/proxyfile.html']
proxy_user = ['ram:123']
[TEMPORARY REDIRECT]
file1 = ['./documentroot/temp.html':'samplefortemp/temp.html']
[PERMANENT REDIRECT]
file1 = ['./documentroot/perm.html':'samplefortemp/perm.html']
[AUTHORIZED FILE]
authorizedfile = ['./documentroot/auth_file.html']
[AUTHORIZED USERS]
users = ['mohit:123']
[LOG]
accesslog = 'log/access.log'
postlog = 'log/post.log'
errorlog = 'log/error.log'
# To start server - python3 servermain.py {portno}
# To stop server - Press Cntrl + C
#protected directory
# dir_per = {
# '/',
# '/assets',
# '/proxy',
# '/samplefortemp'
# }
#protected files
# file_per = {
# 'auth_file.html',
# 'dashboard.html',
# 'favicon.icon',
# 'form.html',
# 'index.html',
# 'menu.html',
# 'new-user.html',
# 'orders.html',
# 'purchases.html',
# 'staff.html',
# 'suppliers.html',
# 'transactions.html',
# '/samplefortemp/perm.html',
# '/samplefortemp/temp.html',
# '/proxy/proxyfile.html'
# }