You say "I did what you said" but you didn't, really.
You need quotes around "starting script" so that the string "starting script" will be output to the logs.txt file.
You also need to put an echo statement between EVERY line of your script so you can tell how far you get.
You also need to use > for the first echo (so it will create the log file anew) and >> for each subsequent echo (so it will append to the new log file and not overwrite it).
echo "starting script logs.txt
echo "Content-type: text/html"
echo "after content-type" >> logs.txt
echo "before cd to library/webserver" >> logs.txt
echo "after cd to library/webserver" >> logs.txt
How do you know it's stopping at 'cd /library/webserver' ?
And IF it is stopping there, does the user under which the script is running have permissions to cd to that directory?