Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Apache Document Root Architecture

Posted on 2012-03-10
4
230 Views
Last Modified: 2012-06-21
If I am setting my machine up to run Apache 2.2 for both development and light production as an external facing web server, what is the best folder structure to establish? A Documentroot that has a folder with each project underneath it? Are there other considerations or configuration settings that I must consider for this setup?

Thanks,
Mike
0
Comment
Question by:mpduffey
  • 2
  • 2
4 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
ID: 37706330
> .. up to run Apache 2.2 for both development and light production
don't do that
use at least to instances of apache, and best also different IPs

if your development breaks apache, your production is oofline, if your development can be cracked, your production can be compromised
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 37706444
I agree with ahoffmann in theory, though I usually don't follow that advice in practice.  My current development environment uses the same Apache service, though I have several IPs to spread the love, so to speak.

You do need to make sure you have separate document roots, at the very least.  If your development application can be infiltrated, which is often the case before you have thoroughly vetted your code, it falls to Apache to keep isolation intact.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 37706455
> .. it falls to Apache to keep isolation intact.
and the OS, and the DB, and other applications, and ... and ... and ...

theoretically you can secure apache and your application, and do you do that in practice, always, all day?

in theory, theory and praxis are identical, in praxis they're not
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 37708017
>>> and the OS, and the DB, and other applications, and ... and ... and ...

Too true.  If an application allows file access into the document root, then separating those document roots implements a needed level of isolation.

Of course, if the application allows unrestricted file system access (e.g., user-provided targets for file(), file_get_contents(), etc., without whitelisting), having separate document roots does not really do anything.  In that case, every document root would be accessible, limited only by file/directory permissions in the context of Apache's user.  But, that is something to be addressed in the application logic.

And I guess there lies the advantage of multiple Apache installations - you can set your production environment to use a much more restricted user than your dev environment.
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question