# OpenGnsys ogdhcp configuration for Apache.

Alias /opengnsys3/rest OGHDPCDIR

# PHP-FPM configuration
<IfModule proxy_fcgi_module>
    <FilesMatch ".+\.ph(p[3457]?|t|tml)$">
        SetHandler "proxy:fcgi://127.0.0.1:9000"
    </FilesMatch>
</IfModule>

RewriteEngine On

# Default configuration.
<Directory OGHDPCDIR>
    Require all granted
    Options -Indexes +FollowSymLinks
    DirectoryIndex index.php
    AddType octet/stream .pkg
    Header set Access-Control-Allow-Origin "*"
    Header set Access-Control-Allow-Methods "GET,POST,OPTIONS,DELETE,PUT"
    Header set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
    FallbackResource /index.php
</Directory>

