How to create an admin area on fake domain

Often, you need to have areas of your site that you access through a browser, that you don’t want anyone else to access. These can be control panels or scripts with phpinfo or your apc cache monitoring script.

what I do is create a fake domain for these and give them their own site. For example a virtual host for domain “admin.area” which of course is not a real domain name or registered anywhere. Remove the index file, forbid browsing folders and place your scripts there.

Plug in your server IP address with the fake domain you created (admin.area) into the hosts file of any computer that needs access.

If you are using varnish, you can also redirect any queries to this domain to your main website for safety and access through the backend port.

You can easily disable the virtual domain altogether when done without interfering with your production sites in any way and risking accidental permission changes or other problems.

Leave a Reply

Your email address will not be published. Required fields are marked *