is It possible to restrict a subdomain from accessing its parent domain? For example
I have a domain called example.com which files are in /public_html
then I have a subdomain, name.example.com
, which is located in /public_html/name
. Now I want to prevent the files in the subdomain from accessing the files in the parent domain in every way. So , that includes, JavaScript and PHP, but PHP is allowed on both the subdomain and parent domain
any solutions for this?
thanks in advance
You should configure your apache httpd.conf file, please see Security Tips
This will forbid default access to filesystem locations. Add appropriate Directory blocks to allow access only in those areas you wish. For example,