Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a LAMP server (Ubuntu) running PHP. I want to host multiple domains on it.

My plan is to create different user for each domain because I want to make sure if one domain gets hacked, it wont affect other domains.

My worry is if one domain gets hacked, how do I prevent hacker from uploading a rogue PHP file that can grab data from my other domains? Is there a way to restrict all PHP files in a certain domain to only operate within that directory and not outside it?

share|improve this question

closed as not a real question by Sven, Hyppy, Wesley, Ward, mgorven Jun 14 '12 at 5:05

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Hosting a true separated, secure multiple-domain environment is a bit of a project. I think the scope of this question may be a bit broad. –  Hyppy Jun 13 '12 at 20:51
    

1 Answer 1

There's several ways to do this. SELinux being one. Virtual servers being another. If you're really savvy, perhaps LXC containers.

But your provided question is far too broad to provide a detailed answer. I'd suggest doing some researching and then ask us specifics if you run into problems testing out potential solutions.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.