Jump to content

how to setup open_basedir.


coolshrimp

Recommended Posts

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 by coolshrimp
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...