Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a server with a number of virtual hosts. Over the last couple of years I have continually been improving on most parts of serving these sites, everything from how and where to do logging, how virtual host configuration is made and contains to where I store these virtual hosts on the server.

Lately I have been scripting some tools to add virtual hosts on my system so that there is less manual work and so I started looking for best practices in general for serving sites with Apache2. When googling the subject there is no lack of answers on best practices for specific subjects (vertically), but there is a lack of answers for best practices on more generic situations and subjects (horisontal).

My questions is: Are there any official best practices for serving sites with Apache2? If such a thing does not exist, are there any good texts that can be read on the subject to better understand consequences of the choices done in configuration of the virtual hosts?

share|improve this question

closed as not constructive by John Conde Jun 4 '13 at 11:41

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 2 down vote accepted

Apache does provide best practice advice in the documentation.

Apache Virtual Host documentation

Apache > HTTP Server > Documentation > Version 2.4

On this link youll find a list of documentation pages which explain all details of virtual host support in Apache HTTP Server.

https://httpd.apache.org/docs/2.4/vhosts/

-->

VirtualHost Examples

This document attempts to answer the commonly-asked questions about setting up virtual hosts. These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts.

https://httpd.apache.org/docs/2.4/vhosts/examples.html

share|improve this answer

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