Can I create a proxy server?
You can configure a local proxy using something like squid. It can be made to create the sort of logs you seem to want.
You'll have to post-process them to get session duration. There are tools that calculate that from common log format or similar. You might have to write your own since your requirements are specific.
You would have to configure each web browser to use the proxy rather than connecting directly to webservers.