Chapters 6 and 7 of Publication Manual of the American Psychological Association, Sixth Edition covers citations and referencing in the APA format.
As @Robin pointed out, EasyBib gives a rundown of how you reference a digitised book (an e-book) at http://www.easybib.com/guides/citation-guides/apa-format/e-book.
Author, F.M. (Year of Publication). Title of Work [E-reader Version]. Retrieved from http://xxxxx or doi:xxxxx
Stoker, B. (2000). Dracula [Kindle HDX version]. Retrieved from http://www.overdrive.com/
Notice the title of the book is in italics
Searching for the version you are talking about, it seems that you are talking about http://darwin-online.org.uk/converted/published/1868_Variation_F877/1868_Variation_F877.2.html which is an HTML version rather than an e-book version so therefore, you would reference this work as [HTML version].
You can either generate the reference manually, or you can get help through citation generators.
Google is helpful with this too. If you do a Google Scholar search for the book or article you want to reference, you can obtain an APA reference by clicking on the image of a set of quotation marks
When you click on the quotation marks you get MLA, APA, Chicago, Harvard and Vancouver format references with export options for BibTeX, EndNote, RefMan, and RefWorks.
Google Scholar here has given a reference for vol.2 but there is a curious reference to O. Judd which I would omit as searching through the digitised version there is nothing in the book about him.
This leaves the reference standing as:
Darwin, C. (1868). The variation of animals and plants under domestication (Vol. 2).
To correctly cite the HTML version you are referring to, you should substitute (Vol. 2) with (Vol.1) and add [HTML Version] along with the retrieval link, making the reference:
Darwin, C. (1868). The variation of animals and plants under domestication (Vol. 1) [HTML Version]. Retrieved from http://darwin-online.org.uk/converted/published/1868_Variation_F877/1868_Variation_F877.2.html
As for a scanned version of the book you are referring to which is available from Archive.org, this one would be referenced with
Darwin, C. (1868). The variation of animals and plants under domestication (Vol. 1) [Digitised Version]. Retrieved from https://archive.org/details/variationofanima01darw
If you managed to find a hardcopy, you would reference it with
Darwin, C. (1868). The variation of animals and plants under domestication (Vol. 1). New York: D. Appleton and Company