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

<VirtualHost *:8095>
    ServerName *:8095
    DocumentRoot /srv/zoneminder/www
    
    # PHP handler
    <FilesMatch \.php$>
        SetHandler "proxy:unix:/run/php-fpm/php-fpm.sock|fcgi://localhost/"
    </FilesMatch>
    
    ScriptAlias /cgi-bin /srv/zoneminder/cgi-bin
    <Directory /srv/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 /srv/zoneminder/www>
        Options -Indexes +FollowSymLinks
        AllowOverride None
        Require all granted
        DirectoryIndex index.php
    </Directory>

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

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

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