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 で見れた!!