Chinaunix首页 | 论坛 | 博客
  • 博客访问: 68849
  • 博文数量: 30
  • 博客积分: 1265
  • 博客等级: 中尉
  • 技术积分: 295
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-04 15:24
文章分类

全部博文(30)

文章存档

2011年(1)

2010年(14)

2009年(11)

2008年(4)

我的朋友

分类: 系统运维

2009-03-14 14:22:44

  1. <VirtualHostip:80>      
  2.          rewriteengine on       
  3.          rewritecond %{HTTP_HOST} [^.]+\.域名\.com$       
  4.          rewriterule ^(.+) %{HTTP_HOST}$1 [C]       
  5.          rewriterule ([^.]+)\.域名\.com(.*) /$1$2       
  6.          其他配置文件       
  7. VirtualHost>

:

<VirtualHost*:80>
     DocumentRoot
/usr/local/pengpeng/xspace/
     ServerName x.
243.com
     ServerAlias  
*.x.243.com
VirtualHost>


<VirtualHost*:80>
     DocumentRoot
/usr/local/pengpeng/xhome/
     ServerName home.
243.com
     ServerAlias  
*.home.243.com
VirtualHost>


Resin:

    <host id="home.243.com"root-directory=".">
       
<host-alias-regexp>^([^/]*).home.243.comhost-alias-regexp>
       
<redeploy-mode>manualredeploy-mode>
       
<web-app id="/"document-directory="/usr/local/pengpeng/xhome/"/>
    
host>
    
<host id="x.243.com"root-directory=".">
       
<host-alias-regexp>^([^/]*).x.243.comhost-alias-regexp>
       
<redeploy-mode>manualredeploy-mode>
       
<web-app id="/"document-directory="/usr/local/pengpeng/xspace/"/>
    
host>



多:

apache:
  

<VirtualHost*:80>
     DocumentRoot /usr/local/pengpeng/channel/
     ServerName blog.pengpeng.com
    
     RewriteEngine On

         # 来自"Host:"头的ServerName ,可能大小写混杂
         RewriteMap lowercase int:tolower

         # 检查hostname正确与否,之后才能使RewriteRule起作用
     RewriteCond ${lowercase:%{HTTP_HOST}} ^blog.pengpeng.com(.*)$
     RewriteCond %{REQUEST_URI} !^/(.+\.do)$

     RewriteRule     ^/index.jsp$    /blog/index.jsp      [PT]
    
VirtualHost *:80>

<VirtualHost*:80>
     DocumentRoot /usr/local/pengpeng/channel/
     ServerName show.pengpeng.com
    
     RewriteEngine On

         # 来自"Host:"头的ServerName ,可能大小写混杂
         RewriteMap lowercase int:tolower

         # 检查hostname正确与否,之后才能使RewriteRule起作用
     RewriteCond ${lowercase:%{HTTP_HOST}} ^show.pengpeng.com(.*)$
     RewriteCond %{REQUEST_URI} !^/(.+\.do)$

     RewriteRule     ^/index.jsp$    /show/index.jsp      [PT]
    
VirtualHost *:80>

<VirtualHost*:80>
     DocumentRoot /usr/local/pengpeng/channel/
     ServerName photo.pengpeng.com
    
     RewriteEngine On

         # 来自"Host:"头的ServerName ,可能大小写混杂
         RewriteMap lowercase int:tolower

         # 检查hostname正确与否,之后才能使RewriteRule起作用
     RewriteCond ${lowercase:%{HTTP_HOST}} ^photo.pengpeng.com(.*)$
     RewriteCond %{REQUEST_URI} !^/(.+\.do)$

     RewriteRule     ^/index.jsp$    /photo/index.jsp      [PT]
    
VirtualHost *:80>


Resin:

<hostid="channel.pengpeng.com"root-directory=".">
      
<host-alias>blog.pengpeng.comhost-alias>
      
<host-alias>show.pengpeng.comhost-alias>
      
<host-alias>photo.pengpeng.comhost-alias>
      
<web-appid="/"document-directory="/usr/local/pengpeng/channel/"/>
    
host>
阅读(729) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~