I want to create a subdomain to be used as a staging environment. I don't want it to be publicly accessible and I want to avoid using htaccess. (e.g. dev.example.com)
The subdomain should be restricted to certain IP addresses, which will be stored in a MySQL table and regularly updated. (I'm running PHP 5.6/Apache/Centos 7)
What is the best way to do this?
I could add a PHP check for $_SERVER['REMOTE_ADDR']
in my config, however, images and javascript files would still be publicly accessible.