Subversion Repositories ALCASAR

Rev

Rev 2920 | 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.use-sslv2 = "disable"
19
    ssl.use-sslv3 = "disable"
20
    ssl.honor-cipher-order = "enable"
21
    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"
22
    var.server_name = "alcasar.localdomain"
23
    server.name = server_name
24
    server.document-root = "/var/www/html"
25
}
26
 
27
$HTTP["scheme"] == "https" {
28
    alias.url = (
29
        "/save" => "/var/Save"
30
    )
31
    # Digest authentication configuration
32
    auth.backend = "htdigest"
33
    auth.require = (
34
        "/acc/" =>
35
        (
36
            "method"  => "digest",
37
            "realm"   => "ALCASAR Control Center (ACC)",
38
            "require" => "valid-user"
39
        ),
40
        "/save/" =>
41
        (
42
            "method"  => "digest",
43
            "realm"   => "ALCASAR Control Center (ACC)",
44
            "require" => "valid-user"
45
        )
46
    )
47
    $HTTP["url"] =~ "^/(acc|save)/" {
48
        # Setting digest files according access permissions
49
        $HTTP["url"] =~ "^/acc/" {
50
            auth.backend.htdigest.userfile = "/usr/local/etc/digest/key_all"
51
            $HTTP["url"] =~ "^/acc/admin" {
52
                auth.backend.htdigest.userfile = "/usr/local/etc/digest/key_admin"
53
            }
54
            $HTTP["url"] =~ "^/acc/manager/" {
55
                auth.backend.htdigest.userfile = "/usr/local/etc/digest/key_manager"
56
            }
57
            $HTTP["url"] =~ "^/acc/backup/" {
58
                auth.backend.htdigest.userfile = "/usr/local/etc/digest/key_backup"
59
            }
60
        }
61
        $HTTP["url"] =~ "^/save" {
62
            auth.backend.htdigest.userfile = "/usr/local/etc/digest/key_backup"
63
            # Enabling directory listing
64
            dir-listing.activate = "enable"
65
        }
66
    }
67
}
68
 
69
$HTTP["scheme"] == "http" {
2923 rexy 70
        # Force HTTPS for specific pages
71
        $HTTP["url"] =~ "^/(acc|save)" {
72
                $HTTP["host"] =~ ".*" {
73
                        url.redirect = (".*" => "https://%0$0")
74
                }
75
        }
2592 rexy 76
}