<VirtualHost *:80>
ServerName admin.fxmagician.com
ServerAlias www.admin.fxmagician.com
DocumentRoot /var/www/admin.fxmagician.com/public/
<Directory /var/www/admin.fxmagician.com/public>
Options All -Indexes
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
##.htaccess##
ErrorDocument 403 /restricted.php
SetEnvIf CF-Connecting-IP "^103\.111\.227\.224$" ALLOWED_IP=1
SetEnvIf CF-Connecting-IP "^146\.70\.102\.166$" ALLOWED_IP=2
Require env ALLOWED_IP
<IfModule mod_dir.c>
DirectoryIndex admin.php
DirectoryIndex restricted.php
</IfModule>