« rails を mongrel で動かす 2 | メイン | GoogleAutoPager導入記 »

mongrel を port 3000 ではなく、port 80 で動かす。

1.mongrel を port 3000 ではなく、port 80 で動かす。
――――――――――――――――――――――――――――――――――――――――

まず、port 80 は apache が占領しているので、排除する。

chkconfig httpd off

[root@localhost conf.d]# chkconfig httpd off
[root@localhost conf.d]#


つぎに、mongrel を 80 で起動する。

mongrel_rails start -p 80 -d -e production

[root@localhost conf.d]# cd /srv/www/lighttpd/lr_portal/
[root@localhost lr_portal]# mongrel_rails start -p 80 -d -e production
** !!! PID file log/mongrel.pid already exists. Mongrel could be running already. Check your log/mongrel.log for errors.
** !!! Exiting with error. You must stop mongrel and clear the .pid before I'll attempt a start.
[root@localhost lr_portal]#


ぬおおお、エラーー!
>Mongrel could be running already.

すでに、走ってるらしい。

では、まず、停止。

[root@localhost lr_portal]# mongrel_rails stop
Sending TERM to Mongrel at PID 9877...Done.
[root@localhost lr_portal]#

うむ停止。

[root@localhost lr_portal]# mongrel_rails start -p 80 -d -e production
[root@localhost lr_portal]#

お!動いた??

アクセスしてみる。

http://10.20.138.111/


あれ??エラーだ!!

正常に接続できませんでした


10.20.138.111 のサーバへの接続を確立できませんでした。


なんで??


port 80に何か・・・。
ファイヤーウォール??


あ、lighttpd・・・そういえば、
前、ポート80にした記憶がアル・・・。

[root@localhost lr_portal]# /etc/init.d/lighttpd stop
lighttpd を停止中: [ OK ]

さらに!

[root@localhost lr_portal]# chkconfig lighttpd off
[root@localhost lr_portal]#

これで、

[root@localhost lr_portal]# mongrel_rails start -p 80 -d -e production
[root@localhost lr_portal]#

アクセスしてみる。

http://10.20.138.111/

キタ━━━━(゚∀゚)━━━━ッ!!?

これで、ポート 80 で見れた!!



トラックバック

このエントリーのトラックバックURL:
http://synth.jp/pg/mt-tb.cgi/392

コメントを投稿

(いままで、ここでコメントしたことがないときは、コメントを表示する前にこのブログのオーナーの承認が必要になることがあります。承認されるまではコメントは表示されません。そのときはしばらく待ってください。)

カレンダー


2007年06月
Su Mo Tu We Th Fr Sa
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Map

About

2007年05月02日 17:37に投稿されたエントリーのページです。

ひとつ前の投稿は「rails を mongrel で動かす 2」です。

次の投稿は「GoogleAutoPager導入記」です。

他にも多くのエントリーがあります。メインページアーカイブページも見てください。