If you do not need a web server on a machine, deactivate Apache in the runlevel editor, uninstall it, or refrain from installing it in the first place. To minimize the risk, deactivate all unneeded servers. This especially applies to hosts used as firewalls. If possible, do not run any servers on these hosts.
By default, the DocumentRoot directory (/srv/www/htdocs) and the CGI directory belong to the user root. You should not change this setting. If the directories were writable for all, any user could place files into them. These files might then be executed by Apache with the permissions of user wwwrun. Also, Apache should not have any write permissions for the data and scripts it delivers. Therefore, these should not belong to the user wwwrun, but to another user, such as root.
To enable users to place files in the document directory of Apache, do not make it writable for all. Instead, create a subdirectory that is writable for all, such as /srv/www/htdocs/miscellaneous.
If users should be allowed to publish files, it is possible to declare a subdirectory of their home directory as suitable for web publishing. This subdirectory is traditionally named ~/public_html. This is activated by default in SUSE LINUX. See 184.108.40.206. “UserDir” for details.
These web pages can be accessed by specifying the user in the URL. The URL contains the element ~username as a shortcut to the respective directory in the home directory of the user. For example, enter http://localhost/~tux in a browser to list the files in the directory public_html in the home directory of the user tux.
If you operate a web server and especially if this web server is publicly accessible, stay informed about bugs and potential vulnerable spots. Sources for exploits and fixes are listed in 23.12.3. “Security”.