coolshrimp Posted December 29, 2015 Share Posted December 29, 2015 (edited) hey guys so i want to do this right no mistakes i need some help.I have one hosting account that i use to host multiple sites (Separate folders).id like to make it so if say a "website" in one folder got hacked they cannot access files in another websites folder.I was told open_basedir for each directory is what i need.Id like to protect each main folder listed in "HostedSites" as a separate site. (Website 1,2,3,4,5,)as well as my own main sites listed in public_html. (Shop, Forum, Demo)also is there a way to automatically set open_dir to any new site added into "HostedSites" folder.and id set the setting in a php.ini file and save in ect folder so it cannot be accessed or changed in-case of any vulnerabilities to my system correct? each site can be accessed 3 ways if that makes a difference. Addon Domain: Website_1.com Main Domain: mysite.com/HostedSites/Website_1 Subdomain: Website_1.mysite.com Here is sample of my directory structure. \ | \-ect | \-bin | \-php | \-mail | \-public_html | \-index.html | \-Shop | \-Forum | \-Demo | \-HostedSites | \-Website_1 | \-Website_2 | \-Website_3 | \-Website_4 | \-Website_5 Edited December 29, 2015 by coolshrimp Link to comment Share on other sites More sharing options...
justsomeguy Posted January 4, 2016 Share Posted January 4, 2016 You can set open_basedir in a .htaccess file inside each website directory, although you'll need to make sure that the web server does not have permission to edit that file. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now