Integration notes: Linux operating system apache and resin

Source: Internet
Author: User

For users who often learn Linux, they must know that the Linux operating system has developed very rapidly over the past decade. If you learn the Linux operating system, you may encounter apache and resin problems in the redhat environment, here we will introduce the solutions to the apache and resin problems in the redhat environment, and share them with you here.

1. install apache

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

2. install 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. Check whether the mod_caucho.so module has been generated in apache. The following figure shows whether the mod_caucho.so module has been generated:

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

4. check whether the main configuration file of apache has been automatically written into the Integrated Configuration:

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

The last section has been written:

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

Add it as follows:

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

In addition, change the main directory for resolution:

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

Note that you need to change the value here. Otherwise, apache will report a 403 error.

5. Configure the resolution directory of resin to point to the apache DocumentRoot:

<! -- <Web-app id = "/" root-directory = "webapps/ROOT"/> --> comment out the default resolution directory.

Add a new 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. Start apache and start resin.

You only need to access the apache Port during access. I hope it will help you learn the Linux operating system.

  1. Configuration notes: configure the DNS server in Linux
  2. How to display Chinese Characters in RedHat Linux 5
  3. How to disable SELinux in Redhat Enterprise Linux
  4. Install the KDE package in Linux
  5. Redhat Linux Remote Desktop configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.