I can't get dwww to work - Keeps getting 404 Not Found

dwww uses cgi to serve the webpages and cgi is no longer enabled in apache2 by default; so you need to enable cgi:

sudo a2enmod cgi

And then restart the apache2 service with:

service apache2 restart

That will solve the major problem you are experiencing with dwww returning not found.

But you might run into another problem. dwww allows access from the web server to files in /var/www/dwww and /usr/share/doc (and it will follow symlinks in other directories to /usr/share/doc).

The additional problem you may find is that some of the documentation files are not in /usr/share/doc.

For example (this will depend on what documentation you have installed), some directories in /usr/share/gtk-doc/html are symlinked to /usr/share/doc/.... These will display is dwww without problem.

But other files are not and will not display automatically. The /usr/share/gtk-doc/html/atk directory, for example, does not use a symlink to /usr/share/doc. Trying to open these files with dwww results in:

dwww will not allow you to read the file /usr/share/gtk-doc/html/atk/index.html 

There is probably a solution for this involving apache2/dwww configuration; but I'm no expert in apache2 security and wouldn't want to introduce a problem.

The simple workaround is to use the file:// protocol for those (very) few files where you find this problem.

For the atk documentation example above, the generated url is:

http://<server-name>/cgi-bin/dwww/usr/share/gtk-doc/html/atk/index.html?type=html

You can go up to the address bar and edit it to:

file:///usr/share/gtk-doc/html/atk/index.html?type=html

and the file will then load.