Freebsd下apache與resin整合手冊

Freebsdapacheresin整合手冊

Evan.Jiang

  • 安裝freebsd

  • 安裝mysql

  • 安裝apache

  • 安裝php

  • 安裝resin

安裝resin等back-end

1 、# cd /usr/ports/www/resin3

2、# make WITH_APACHE2=yes install clean

3、編輯httpd.conf 在後面加入以下內容:

<IfModule mod_caucho.c>

ResinConfigServer localhost 6802

</IfModule>

  • 設置resin3隨機啟動
  • echo 『resin3_enable=”YES” 『 >> /etc/rc.conf
  • 手動啟動resin3

#/usr/local/etc/rc.d/resin3.sh start

  • 整合apache與resin

在apache增加二級域名

現在以coopunion.ding9.com 二級域名(虛擬主機)為例

  • 在conf 增加下面內容

Alias /coopunion  /usr/local/www/apache22/uniondata/coopunion

<Directory /usr/local/www/apache22/uniondata/coopunion>

Order allow,deny

Allow from all

</Directory>

 

<VirtualHost *:80>

ServerAdmin webmaster@ding9.net

DocumentRoot /usr/local/www/apache22/uniondata/coopunion

ServerName coopunion.ding9.local

       ServerAlias ding9.com

#       RewriteEngine on

</VirtualHost>

在resin增加二級域名。

編輯/usr/local/etc/resin3/resin.xml

vi /usr/local/etc/resin3/resin.xml

 

找到這下一段話:

<cluster>

<srun server-id=”” host=”127.0.0.1″ port=”6802″/>

</cluster>

 

改為:

<cluster>

<srun server-id=”” host=”localhost” port=”6802″/>

</cluster>

再找到下面這段話:

<web-app id=”/” document-directory=”webapps/ROOT”/>

改為下面這樣:

<!– <web-app id=”/” document-directory=”webapps/ROOT”/> –>

<web-app id=”/” document-directory=”/usr/local/www/apache22/data”/>

<web-app id=”/lucene” document-directory=”/usr/home/javadata/lucene”/>

 

再增加下面內容:

 

<host id=”ding9admin.ding9.com”>

<web-app id=”/” document-directory=”/usr/local/www/apache22/uniondata/ding9admin”/>

</host>

 

至此,apache與resin的整合完成

以下文章點擊率最高

Loading…

     

如果這文章對你有幫助,請掃左上角微信支付-支付寶,給於打賞,以助博客運營