Perseus, as Philip Newton said.
The TLG – Home (my employer) has pretty much all the Ancient and much of the mediaeval corpus available by subscription, with a subset publicly accessible.
The Little Sailing (Ancient Greek Texts) has older editions of many texts.
As always, a lot of old editions are available on Google Books and archive.org (Digital Library of Free Books, Movies, Music & Wayback Machine).