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
 
52
            $HTTP["url"] =~ "^/acc/admin" {
53
                auth.backend.htdigest.userfile = "/usr/local/etc/digest/key_admin"
54
            }
55
 
56
            $HTTP["url"] =~ "^/acc/manager/" {
57
                auth.backend.htdigest.userfile = "/usr/local/etc/digest/key_manager"
58
            }
59
 
60
            $HTTP["url"] =~ "^/acc/backup/" {
61
                auth.backend.htdigest.userfile = "/usr/local/etc/digest/key_backup"
62
            }
63
        }
64
        $HTTP["url"] =~ "^/save" {
65
            auth.backend.htdigest.userfile = "/usr/local/etc/digest/key_backup"
66
            # Enabling directory listing
67
            dir-listing.activate = "enable"
68
        }
69
    }
70
}
71
 
72
$HTTP["scheme"] == "http" {
73
	# Force HTTPS for specific pages
74
	$HTTP["url"] =~ "^/(acc|save)" {
75
		$HTTP["host"] =~ ".*" {
76
			url.redirect = (".*" => "https://%0$0")
77
		}
78
	}
79
}