Solved

Apache Document Root Architecture

Posted on 2012-03-10
4
219 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now