Subversion Repositories ALCASAR

Rev

Rev 2923 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
2592 rexy 1
$HTTP["url"] =~ ".*" {
2
    # Disabling directory listing as default setting
3
    dir-listing.activate = "disable"
4
}
5
 
6
# If a wrong url is used, displaying homepage for unprivileged users
7
$HTTP["url"] !~ "^/(acc|save)/" {
8
    server.error-handler-404 = "/"
9
}
10
 
11
# Error pages
12
server.errorfile-prefix = "/var/www/html/errors/error-" 
13
 
14
$SERVER["socket"] == "alcasar.localdomain:443" {
15
    ssl.engine = "enable"
16
    ssl.pemfile = "/etc/pki/tls/private/alcasar.pem"
2814 rexy 17
    ssl.ca-file = "/etc/pki/tls/certs/server-chain.pem"
2592 rexy 18
    ssl.honor-cipher-order = "enable"
19
    ssl.cipher-list = "ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS"
20
    var.server_name = "alcasar.localdomain"
21
    server.name = server_name
22
    server.document-root = "/var/www/html"
23
}
24
 
25
$HTTP["scheme"] == "https" {
26
    alias.url = (
27
        "/save" => "/var/Save"
28
    )
29
    # Digest authentication configuration
30
    auth.backend = "htdigest"
31
    auth.require = (
32
        "/acc/" => 
33
        (
34
            "method"  => "digest",
35
            "realm"   => "ALCASAR Control Center (ACC)",
36
            "require" => "valid-user"
37
        ),
38
        "/save/" => 
39
        (
40
            "method"  => "digest",
41
            "realm"   => "ALCASAR Control Center (ACC)",
42
            "require" => "valid-user"
43
        )
44
    )
45
    $HTTP["url"] =~ "^/(acc|save)/" {
46
        # Setting digest files according access permissions
47
        $HTTP["url"] =~ "^/acc/" {
48
            auth.backend.htdigest.userfile = "/usr/local/etc/digest/key_all"
49
 
50
            $HTTP["url"] =~ "^/acc/admin" {
51
                auth.backend.htdigest.userfile = "/usr/local/etc/digest/key_admin"
52
            }
53
 
54
            $HTTP["url"] =~ "^/acc/manager/" {
55
                auth.backend.htdigest.userfile = "/usr/local/etc/digest/key_manager"
56
            }
57
 
58
            $HTTP["url"] =~ "^/acc/backup/" {
59
                auth.backend.htdigest.userfile = "/usr/local/etc/digest/key_backup"
60
            }
61
        }
62
        $HTTP["url"] =~ "^/save" {
63
            auth.backend.htdigest.userfile = "/usr/local/etc/digest/key_backup"
64
            # Enabling directory listing
65
            dir-listing.activate = "enable"
66
        }
67
    }
68
}
69
 
70
$HTTP["scheme"] == "http" {
71
	# Force HTTPS for specific pages
72
	$HTTP["url"] =~ "^/(acc|save)" {
73
		$HTTP["host"] =~ ".*" {
74
			url.redirect = (".*" => "https://%0$0")
75
		}
76
	}
77
}