Document root is set to /projects because this is where Project Explorer is looking for projects sources in a workspace. You may want to take a look at this Dockerfile: https://github.com/codenvy/dockerfiles/blob/master/php/latest/Dockerfile#L30
You can certainly set web root for any other directory, but create a symlink to /projects directory to find your sources in the Project Explorer and be able to open files in the editor.
You can set it using mcedit
in a running workspace, however, when a workspace is stopped, these changes are gone. So you'll need to snapshot you workspace to save changes.
Or you can set it with sed
in the Dockerfile when creating a workspace on the Dashboard > Custom Stack > Write your own stack. It may look something like this:
FROM codenvy/php
RUN sudo sed -i 's/\/var\/www\/html/\/projects/g' /etc/apache2/sites-available/000-default.conf