문제

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

<Directory />
    Require all denied
</Directory>

This will forbid default access to filesystem locations. Add appropriate Directory blocks to allow access only in those areas you wish. For example,

<Directory /usr/users/*/public_html>
    Require all granted
</Directory>
<Directory /usr/local/httpd>
    Require all granted
</Directory>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top