20
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

COBOLでウェッブアプリケーションを書く

Posted at

COBOLいじってて、Webフレームワークとかあんのかなーと思って調べてたらあった。
COBOL on Wheelchair

COBOL on Wheelchair is a minimal webframework^H^H^H^H^H^H just a proof of concept.

準備

AWS上のUbuntu 14.04で試した。

$ sudo apt-get install git apache2 open-cobol
$ git clone https://github.com/azac/cobol-on-wheelchair /var/www/cobol-app

ソースをコンパイルする。

/var/www/cobol-app $ ./downhill.sh
/var/www/cobol-app $ ./the.cow
content-type: text/html

<html>
        <head>
...
/var/www/cobol-app $ 

CGIとして動かせるようにApacheを設定する。

/etc/apache2/apache2.conf
ScriptAlias /cgi-bin/ "/var/www/cobol-app/"
<Directory /var/www/cobol-app/>
     AddHandler cgi-script .cow
     Options +ExecCGI
     AddHandler image/png .png
</Directory>

mod_cgiを有効にして再起動する。

$ sudo a2enmod cgi
$ sudo /etc/init.d/apache2 restart

http://[IPアドレス]/cgi-bin/the.cow にブラウザでアクセスできるはず。車椅子に乗った変な恐竜が出てきて渋い。
スクリーンショット 2014-09-03 00.13.03.png

(routing機能のとこがうまく動かなかった・・)

公開されないままストップしているけど、こういうのもあるらしい
COBOL ON COGS

WE ARE CURRENTLY IN#THE LAST PHASES@OF@BETA TESTING.

20
16
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?