The AllowOverride directive controls this: http://httpd.apache.org/docs/current/mod/core.html#allowoverride
To allow AllowOverride in a directory, add the following rules to the /etc/httpd/conf/httpd.conf or similar configuration file for your apache installation:
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
Allow from all
Note that this can be put inside the virtual host configuration block too.