summarylogtreecommitdiffstats
path: root/zoneminder-httpd.conf
blob: fa99047b8f781c62d6ffad02d5be7c67c6977d96 (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
Listen 8095

<VirtualHost *:8095>
    DocumentRoot /usr/share/webapps/zoneminder/www

    # PHP handler
    <FilesMatch \.php$>
        SetHandler "proxy:unix:/run/php-fpm/php-fpm.sock|fcgi://localhost/"
    </FilesMatch>

    ScriptAlias /cgi-bin /usr/share/webapps/zoneminder/cgi-bin
    <Directory /usr/share/webapps/zoneminder/cgi-bin>
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        AllowOverride None
        Require all granted
    </Directory>

    Alias /cache /var/lib/zoneminder/cache
    <Directory /var/lib/zoneminder/cache>
        Options -Indexes +FollowSymLinks
        AllowOverride None
        Require all granted
    </Directory>

    <Directory /usr/share/webapps/zoneminder/www>
        Options -Indexes +FollowSymLinks
        AllowOverride None
        Require all granted
        DirectoryIndex index.php
    </Directory>

    <Directory /usr/share/webapps/zoneminder/www/api>
        RewriteEngine On
        RewriteRule ^$ app/webroot/ [L]
        RewriteRule (.*) app/webroot/$1 [L]
        RewriteBase /api
    </Directory>

    <Directory /usr/share/webapps/zoneminder/www/api/app>
        RewriteEngine On
        RewriteRule ^$ webroot/ [L]
        RewriteRule (.*) webroot/$1 [L]
        RewriteBase /api
    </Directory>

    <Directory /usr/share/webapps/zoneminder/www/api/app/webroot>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.php [L]
        RewriteBase /api
    </Directory>
</VirtualHost>