By default teamviewer uses port 80 and 443 for outbound communications. This is a problem if you are running a webserver. In order to stop teamviewer using these ports, open options, Advanced and under Advanced network settings check on
Don’t use incoming port 80 and 443 (recommended for web servers only)