Is it ok to include references to a book in a report even if I have not quoted the book in the text?
Felix, the short answer is no. Though you can reference a book from which you did not include a verbatim quote, but you must not ref a book you have not read and used.

Books have a legitimate role even in the life of a webmaster. I am sure the information you looked up on Stackoverflow is also covered in books like, for example Red_Hat_Enterprise_Linux-7-System_Administrators_Guide, Modern PHP: New Features and Good Practices or Hacking: Beginner to Expert Guide to Computer Hacking. Have half a dozen of these substantial reference volumes at hand and use them. Your teachers aim to build a practice they you will follow later on, the practice of using several reliable sources for the information and knowledge you gather.