allow_override:
- All
directoryindex: 'index.php index.html'
- - location1:
+ - location_root:
provider: location
path: '/'
auth_type: Digest
auth_digest_algorithm: MD5
auth_user_file: '/etc/httpd/htdigest'
auth_require: 'valid-user'
+ - location_api:
+ provider: location
+ path: '/api'
+ - location_sfp:
+ provider: location
+ path: '/sfp'
+ error_documents:
+ - { error_code: 401 , document: "/401.html" }
+
+ - directory_sfp:
+ provider: directory
+ path: '/var/www/spar-checker/sparchecker-backend/public/sfp/'
+ addhandlers:
+ - { handler: "proxy:unix:/var/run/php5-fpm-sparchecker.sock|fcgi://./" , extensions: '.php' }
+ options:
+ - FollowSymLinks
+ - MultiViews
+ allow_override:
+ - All
+ directoryindex: 'index.php index.html'
+ rewrites:
+ - comment: 'sfp files'
+ rewrite_cond:
+ - '%%{ich-trickse}{REQUEST_FILENAME} -s [OR]'
+ - '%%{ich-trickse}{REQUEST_FILENAME} -l [OR]'
+ - '%%{ich-trickse}{REQUEST_FILENAME} -d'
+ rewrite_rule:
+ - '^(.*)$ - [L]'
+ - comment: 'sfp rebase'
+ rewrite_cond:
+ - '%%{ich-trickse}{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$'
+ rewrite_rule:
+ - '^().*)$ - [E=BASE:%1]'
+ - comment: 'sfp index'
+ rewrite_rule:
+ - '^(.*)$ %{ENV:BASE}/index.php [L]'
+
+ - directory_api:
+ provider: directory
+ path: '/var/www/spar-checker/sparchecker-backend/public/api/'
+ addhandlers:
+ - { handler: "proxy:unix:/var/run/php5-fpm-sparchecker.sock|fcgi://./" , extensions: '.php' }
+ options:
+ - FollowSymLinks
+ - MultiViews
+ allow_override:
+ - All
+ directoryindex: 'index.php index.html'
+ rewrites:
+ - comment: 'api files'
+ rewrite_cond:
+ - '%%{ich-trickse}{REQUEST_FILENAME} -s [OR]'
+ - '%%{ich-trickse}{REQUEST_FILENAME} -l [OR]'
+ - '%%{ich-trickse}{REQUEST_FILENAME} -d'
+ rewrite_rule:
+ - '^(.*)$ - [L]'
+ - comment: 'api rebase'
+ rewrite_cond:
+ - '%%{ich-trickse}{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$'
+ rewrite_rule:
+ - '^().*)$ - [E=BASE:%1]'
+ - comment: 'api index'
+ rewrite_rule:
+ - '^(.*)$ %{ENV:BASE}/index.php [L]'
+
headers:
- 'always set X-XSS-Protection "1; mode=block"'
- 'always set X-Frame-Options "SAMEORIGIN"'