• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

How permission correctly in vhost?

Azurel

Silver Pleskian
Hello.

I have domainA and domainB. domainA hosting files, for security ALL browser access should denied.. EXCEPT domainB make in php call with readfile() to a file on domainA. This should allowed.

domainB => readfile(http://domainA/myfile) => allowed ... all other access should denied.

So I set in vhost of domainA this:
<DirectoryMatch "^/var/www/vhosts/domainA/httpdocs/folder/">
Order deny,allow
Deny from all
Allow from 127
Allow from server-ipv4
Allow from server-ipv6/128
Allow from ::1/128
</DirectoryMatch>

but that give me in domainB for readfile():
readfile(http://domainA/folder/file.png): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden

Plesk 11.5.30#48 with centOS6.6

Can anybody show me my mistake?
 
Back
Top