Secure VPS and LAMP configuration

  • Posted on September 4, 2014
  • mstfldmrAsked by mustafa


I need to set up a new Ubuntu server for hosting multiple websites. Which steps should I follow for maximum security and performance?


  • How can I configure Apache, so that each users won’t be able to access each other’s files?
  • And every virtual host runs with a separate user?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

@aguilar1181, thanks but it’s not an option now. I need to do it myself and I’m looking for helpful advices

I would save myself some trouble and install cpanel/whm. Yes is an extra cost but it will solve those problems for you.

hi @asb,

that’s not what I want. I will set up a Virtual host for each client with custom domain name.

If Apache process runs as one single user, like www-data or apache, clients can read each other’s files.

Should I run an Apache process by a separate user for each client? Or should I use chroot jailing for Apache?