The Apache HTTP Server documentation lives in the same Git repository as the server source code, at github.com/apache/httpd. This page walks you through checking out the docs, setting up the build tools, and submitting your changes as a pull request.
If you're new to Git, don't worry — the commands below are all you need to get started.
There are two active branches:
We recommend a separate working tree for each branch. First, clone the
repository as httpd-trunk:
git clone https://github.com/apache/httpd.git httpd-trunk
Then make a second clone called httpd-2.4 and switch it to the 2.4.x
branch:
git clone https://github.com/apache/httpd.git httpd-2.4
cd httpd-2.4
git checkout 2.4.x
Having both lets you submit pull requests against either branch. Most documentation changes should target trunk first, then be backported to 2.4.x if applicable.
The documentation build tools are kept separately, in Subversion. In
each of your two trees, check them out into docs/manual/build:
cd httpd-trunk/docs/manual
svn co https://svn.apache.org/repos/asf/httpd/docs-build/trunk build
cd httpd-2.4/docs/manual
svn co https://svn.apache.org/repos/asf/httpd/docs-build/trunk build
See Documentation Format and Build for how to use them.
Once you have a checkout, you'll find the documentation source under
docs/manual/. Here's what lives where:
mod/ — module reference pages (one .xml per module)howto/ — tutorial-style how-to guidesvhosts/ — virtual host documentationrewrite/ — mod_rewrite guide and recipesmisc/ — miscellaneous reference pagesfaq/ — frequently asked questionsssl/ — SSL/TLS documentationprograms/ — httpd support programs documentationstyle/ — DTD, XSL, CSS (build system — don't edit unless you
know what you're doing)build/ — the build tools you checked out above.xml files — the source you edit.xml.meta — auto-generated metadata (don't edit).html.* files — auto-generated HTML output (don't edit)Several file types in the tree are build output — never edit these directly:
.html and .html.* files — generated HTML output for each
language. These are rebuilt from the .xml source..xml.meta files — generated by the build system to track
translation status and revision info.allmodules.xml — auto-generated when adding new modules.Only edit .xml source files. Everything else is derived from them.
Changes are submitted as pull requests against github.com/apache/httpd.
On GitHub, fork apache/httpd to your own account, then add your fork as a remote in your checkout:
git remote add fork https://github.com/YOUR-USERNAME/httpd.git
Always pull the latest changes before you start editing, then create a branch for your work:
git pull
git checkout -b fix-proxy-example
Documentation files are in the docs/manual/ subdirectory. Find the
file you want to change, make your edits, and save.
git add docs/manual/mod/mod_rewrite.xml
git commit -m "mod_rewrite: clarify RewriteRule flags example"
git push fork fix-proxy-example
Open a pull request against apache/httpd. After you push, GitHub shows a "Compare & pull request" button on your fork's page; click it.
At the top of the pull request form are two dropdowns: base (the branch your change goes into) and compare (your branch). Set base to:
trunk — for most changes. This is the default.2.4.x — if your change only applies to the 2.4 release.In the description, include:
If your change is only for 2.4.x, do the work in your httpd-2.4 tree,
which already has the 2.4.x branch checked out. Create your branch
from there, so it starts from 2.4.x rather than trunk:
cd httpd-2.4
git checkout 2.4.x
git pull
git checkout -b fix-2.4-proxy-example
Edit, commit, and push as above:
git push fork fix-2.4-proxy-example
When you open the pull request, change the base dropdown from
trunk to 2.4.x. Check the list of commits and files GitHub
shows you: it should contain only your change. If it shows hundreds of
unrelated commits, the base is set to the wrong branch.
You can also go straight to a pull request form with the right base
using a URL like this (replace YOUR-USERNAME and the branch name):
https://github.com/apache/httpd/compare/2.4.x...YOUR-USERNAME:fix-2.4-proxy-example
If you use the GitHub CLI, pass the base
branch with --base:
gh pr create --repo apache/httpd --base 2.4.x
Most documentation changes land on trunk first. If a merged trunk
change also applies to 2.4, a committer brings it over to the 2.4.x
branch with git cherry-pick, which copies a commit from one branch
onto another.
After the pull request is merged into trunk, note the commit hash. You can find it on the pull request page (the "merged commit" link), or in your trunk tree:
cd httpd-trunk
git pull
git log --oneline -- docs/manual/mod/mod_rewrite.xml
If the pull request was merged as several commits rather than squashed into one, note each of them, oldest first.
In your httpd-2.4 tree, fetch the latest trunk commits and
cherry-pick:
cd httpd-2.4
git checkout 2.4.x
git pull
git fetch origin trunk
git cherry-pick -x abc1234
The -x option adds a "(cherry picked from commit abc1234)" line to
the commit message, so anyone can trace the backport to the original
trunk change. For several commits, list them in order:
git cherry-pick -x abc1234 def5678.
The 2.4 version of a file may differ from trunk, for example where a section documents a feature that only exists in trunk. If the cherry-pick stops with a conflict, edit the affected files to keep what's right for 2.4, then:
git add docs/manual/mod/mod_rewrite.xml
git cherry-pick --continue
To give up and start over, run git cherry-pick --abort.
Rebuild and validate the 2.4 docs (see Documentation Format and Build), then push:
git push origin 2.4.x
If you'd rather have the backport reviewed first, push the result to a
branch on your fork and open a pull request with base set to
2.4.x instead, as described above.
fix-proxy-example is more
helpful than patch-1.