整合筆記:Linux作業系統apache和resin

來源:互聯網
上載者:User

對於經常學習Linux的使用者,一定知道在這十年裡Linux作業系統發展的非常迅速,學習Linux作業系統,你可能會遇到redhat環境下apache和resin問題,這裡將介紹redhat環境下apache和resin問題的解決方案,在這裡拿出來和大家分享一下。

1.安裝apache

 
  1. [root@localhost httpd-2.2.11]#  
  2. ./configure --prefix=/usr/local/apache2 --enable-so  
  3. make  
  4. make install 

2.安裝resin

 
  1. [root@localhost resin-pro-3.1.8]#   
  2. ./configure --prefix=/usr/local/resin2 --with-apxs=/usr/local/apache2/bin/apxs --with-  
  3. apache=/usr/local/apache2/  
  4. make  
  5. make install 

3.查看apache是不是已經產生了mod_caucho.so模組,如下,已經產生

 
  1. [root@localhost modules]# pwd  
  2. /usr/local/apache2/modules  
  3. [root@localhost modules]# ls  
  4. httpd.exp mod_caucho.so 

4.查看apache的主設定檔是不是已經自動寫入整合配置:

 
  1. [root@localhost conf]# pwd  
  2. /usr/local/apache2/conf  
  3. [root@localhost conf]# vi httpd.conf  

最後的段落髮現已經寫入:

 
  1. LoadModule caucho_module /usr/local/apache2/modules/mod_caucho.so  
  2. ResinConfigServer localhost 6800  
  3. CauchoConfigCacheDirectory /tmp  
  4. CauchoStatus yes 

自己在下面添加:

 
  1. SetHandler caucho-status  
  2. AddHandler caucho-request jsp   
  3. SetHandler caucho-request 

另外改變解析的主目錄:

 
  1. DocumentRoot "/home/XXX/"  
  2. # This should be changed to whatever you set DocumentRoot to.  
  3. #  
  4. <Directory "/home/XXX"> # 

注意這裡也要改,不然apache會報403錯誤

5.配置resin的解析目錄指向apache的DocumentRoot:

<!--<web-app id="/" root-directory="webapps/ROOT"/>   --> 注釋掉預設的解析目錄

在下面添加一個新的host

 
  1. <host id="" root-directory="."> 
  2. <redeploy-mode>manual</redeploy-mode> 
  3. <web-app id="/" document-directory="/home/XXX"> 
  4. <access-log path="/home/XXXlog/access.log" 
  5. format="%h`%l`%u`%{%Y-%m-%d %H:%M:%S}t`%r`%s`%b`%{Referer}i`%{User-Agent}i`%{X-Up  
  6. -Calling-Line-ID}i"  
  7. rollover-period='1D' 
  8. archive-format='%Y-%m-%d.access.XXX.log'/> 
  9.  </web-app> 
  10. </host> 

6.啟動apache,啟動resin.

訪問的時候只要訪問apache的連接埠就行了。希望對你學習Linux作業系統有所協助。

  1. 配置筆記:Linux配置DNS伺服器
  2. 講解RedHat Linux 5顯示中文的方法
  3. 教會你Redhat Enterprise Linux關閉SELinux
  4. 輕鬆完成Linux安裝KDE軟體包
  5. 闡述Redhat Linux配置遠端桌面

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.