directories:
- provider: directory
path: '/var/www/spar-checker/sparchecker-frontend/'
- addhandlers:
- - { handler: "proxy:unix:/var/run/php5-fpm-sparchecker.sock|fcgi://./" , extensions: '.php' }
options:
- FollowSymLinks
- MultiViews
path: '/api'
- provider: location
path: '/sfp'
+ setenvif:
+ - 'X-Forwarded-For ^80.146.239.2 admin_ip_range'
+ - 'X-Forwarded-For ^109.86.229.215 admin_ip_range'
+ - 'X-Forwarded-For ^195.69.134.114 admin_ip_range'
+ - 'X-Forwarded-For ^88.99.67.38 admin_ip_range'
auth_type: Digest
auth_name: 'Manager-Interface'
auth_digest_provider: file
auth_user_file: '/etc/httpd/spk.managed.htdigest'
require:
- 'valid-user'
- - 'ip 80.146.239.2/32 109.86.229.215/32 195.69.134.114/32 88.99.67.38/32'
+ - 'env admin_ip_range'
error_documents:
- { error_code: 401 , document: "/401.html" }
directories:
- provider: directory
path: '/var/www/spar-checker/sparchecker-frontend/'
- addhandlers:
- - { handler: "proxy:unix:/var/run/php5-fpm-sparchecker.sock|fcgi://./" , extensions: '.php' }
options:
- FollowSymLinks
- MultiViews
path: '/api'
- provider: location
path: '/sfp'
+ setenvif:
+ - 'X-Forwarded-For ^80.146.239.2 admin_ip_range'
+ - 'X-Forwarded-For ^109.86.229.215 admin_ip_range'
+ - 'X-Forwarded-For ^195.69.134.114 admin_ip_range'
+ - 'X-Forwarded-For ^88.99.67.38 admin_ip_range'
# auth_type: Digest
# auth_name: 'Manager-Interface'
# auth_digest_provider: file
# auth_user_file: '/etc/httpd/spk.managed.htdigest'
require:
# - 'valid-user'
- - 'ip 80.146.239.2/32 109.86.229.215/32 195.69.134.114/32 88.99.67.38/32'
+ - 'env admin_ip_range'
error_documents:
- { error_code: 401 , document: "/401.html" }