We are providing a step-by-step guidance to setup the Kafka site as your local apache server's homepage. This could be useful when you are contributing doc changes, and would like to have a easy way of displaying and debugging your modified website. The guidance itself is based on OSX, but should be easily adopted for other Linux / Unix OS as well.
1. Make Sure Apache HTTP Service is Already Installed
In OSX, Apache Http Service should be installed by default. To validate it, you can check if command "apachectl" exists or not:
If Apache Web Service is not installed, follow this page to download and install it.
And then on your browser, see if
renders successfully or not. For example, by default it will load the page defined in
And you should see "It Worked!" text.
2. Make Sure Kafka-Site Git Repo Exist
Make sure you have cloned your forked kafka-site git repo (e.g. https://github.com/guozhang/kafka-site) from the apache git repo (https://github.com/apache/kafka-site) in your local directory, and then add the apache git repot as an additional remote repo. For example, after these steps your local repo should look like:
3. Modify the Apache Configuration
Now you need to find the Apache Http Service config file and start editing on it. The config file could be found as (depending on your OS type and version)
And make the following changes on this file:
Step 1. Uncomment the following two lines. This is to enable loading "mod_include" and "mod_rewrite" modules.
Step 2. Change "DocumentRoot" and "Directory" to your kafka-site repo directory; and change AllowOverride from "None" to "All". The changed lines are marked below:
4. Reload Apache HTTP Service Homepage
Now simply restarting the Http web service:
And refreshing on your browser should then show up the complete Kafka site.
From now on, when editing on your local kafka-site git repo, you can simply repeat the above step 4 and see how the changes will be displayed now. NOTE that your doc changes should most likely be in the kafka repo still, instead of the kafka-site repo, and in order to display these changes you should copy the modified docs to kafka-site repo into the matching release folders.
5. Shutdown Apache HTTP Service
If you want to shutdown the web server, simply type: