I recommend you to check the WebServer example in the Arduino IDE. It is under File>Examples>Ethernet>WebServer. You can also look for similar projects in the web; there are several projects and examples for Arduino. You could check them and adapt the examples to be used with Galileo. Anyhow, the WebServer example is a good point to start, I recommend you to check it.