Essentials

Source Repositories

Documentation

Get Involved

Subprojects

Related Projects

Miscellaneous

Git Workflow

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.

Checking Out the Repository

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.

Getting the Build Tools

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.

Repository Layout

Once you have a checkout, you'll find the documentation source under docs/manual/. Here's what lives where:

What's Auto-Generated?

Several file types in the tree are build output — never edit these directly:

Only edit .xml source files. Everything else is derived from them.

Submitting a Pull Request

Changes are submitted as pull requests against github.com/apache/httpd.

1. Fork the Repository

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

2. Update Your Checkout and Create a Branch

Always pull the latest changes before you start editing, then create a branch for your work:

git pull
git checkout -b fix-proxy-example

3. Edit the Documentation

Documentation files are in the docs/manual/ subdirectory. Find the file you want to change, make your edits, and save.

4. Commit and Push

git add docs/manual/mod/mod_rewrite.xml
git commit -m "mod_rewrite: clarify RewriteRule flags example"
git push fork fix-proxy-example

5. Open the Pull Request

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:

In the description, include:

Sending a Pull Request to the 2.4.x Branch

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

Backporting a Change to 2.4.x (for Committers)

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.

1. Find the Commit

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.

2. Cherry-Pick It onto 2.4.x

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.

3. Resolve Conflicts, If Any

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.

4. Validate and Push

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.

Tips

See Also