goo blog サービス終了のお知らせ 

pepoとネットワークを語ろう

40年前からこれまでとこれからのネットワークを語る

くじらのだんなrubyで苦戦中!

2011-03-23 20:37:10 | Linux

くじらのだんな、訳あってrubyのcgiにチャレンジ中

初歩の初歩でつまずいた

rubyのprint分のおまじない

print "Content-Type:text/html;charset=UTF-8\n\n"

のところ、行末の\nが一つでも抜けると以下の通りエラーとなる

print "Content-Type:text/html;charset=UTF-8\n"

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@epicon.pepolinux.local and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Apache/2.2.3 (CentOS) Server at 192.168.1.1 Port 80

pepo