Yes this is possible. The documentation for Apache is full of better
examples than I could provide..
The one you would like to start with is here:
If you have problems, make sure the examples and help you find are for
the same version of Apache that you are using (the one I mentioned is for