Beginning with Apache 2, it is no longer recommended to manually edit the httpd.conf file. You must instead either add "main" include directives via WHM, or else manually create & edit conf file stored in specific user folders.
Assuming a user account named "testacct", here's how you might add a custom ScriptAlias directive:
- Create /usr/local/apache/conf/userdata/std/2/testacct/testsdomain.com/httpd.conf . NOTE: The conf file can actually be named whatever you want, since the main httpd.conf is reading "*.conf".
- Edit the new file in vi (or similar text editor) & add in the custom directives. For example: ScriptAlias /cgi-bin/ /home/testacct/public_html/cgi-bin/
- Save the file & exit the editor.
- Rebuild the httpd.conf file using: /scripts/rebuildhttpdconf
- Restart the Apache daemon using: service httpd restart
The article has been updated successfully.