初めての?Webアプリ開発
プロつく計画、新シリーズです。
以前からカービィグッズを買い漁っているのですが、
「最近これ買ったかな?」とレジで悩むことが多発し、
過去に買ったグッズを管理するWebアプリを作ろうと思いました。
以下メモ。 - 言語はRuby、RoRを使う(ことが目的)。 - データベースで買ったグッズを管理。 - Heroku なり VPS なりにデプロイする。 - Webから購入を検討するグッズを登録できる。 - 各グッズにステータスを持たせる - 登録したら購入検討状態 - 買ったらページからグッズのステータスを購入済みにする
Apacheが立ち上がらなくなったので直した
ただのメモ。
ローカルで pukiwiki を動かすために、 apache を使っているのだけど、
ある日いつもどおりに動かなくなった。
エラーメッセージ
[Apache] Error: Apache shutdown unexpectedly. [Apache] This may be due to a blocked port, missing dependencies, [Apache] improper privileges, a crash, or a shutdown by another method. [Apache] Press the Logs button to view error logs and check [Apache] the Windows Event Viewer for more clues [Apache] If you need more help, copy and post this [Apache] entire log window on the forums
エラーログ
[Mon Nov 25 23:38:25.451512 2019] [cgi:error] [pid 39236:tid 1892] [client 127.0.0.1:62344] End of script output before headers: hello.py [Mon Nov 25 23:38:25.454511 2019] [cgi:error] [pid 39236:tid 1892] [client 127.0.0.1:62344] AH01215: File "C:/xampp/cgi-bin/hello.py", line 19\r: C:/xampp/cgi-bin/hello.py [Mon Nov 25 23:38:25.454511 2019] [cgi:error] [pid 39236:tid 1892] [client 127.0.0.1:62344] AH01215: break\r: C:/xampp/cgi-bin/hello.py [Mon Nov 25 23:38:25.454511 2019] [cgi:error] [pid 39236:tid 1892] [client 127.0.0.1:62344] AH01215: ^\r: C:/xampp/cgi-bin/hello.py [Mon Nov 25 23:38:25.454511 2019] [cgi:error] [pid 39236:tid 1892] [client 127.0.0.1:62344] AH01215: SyntaxError: 'break' outside loop\r: C:/xampp/cgi-bin/hello.py
なんかCGI の設定あたりでエラーが発生しているようだ。
そういや udemy の講座で httpd.conf をいじったりしたなぁ。
<Directory "C:/xampp/cgi-bin"> AllowOverride All Options ExecCGI Require all granted </Directory>
まぁCGIの実行を取り消すだけでいいか。
<Directory "C:/xampp/cgi-bin"> AllowOverride All Options None Require all granted </Directory>
動いた。よし。