现在的位置: 首页 > 综合 > 正文

常见服务器 配置一览

2013年10月06日 ⁄ 综合 ⁄ 共 3444字 ⁄ 字号 评论关闭

 

tomcat 中 配置虚拟主机 及 发布项目文件夹,实践中 在tomcat7中有些问题
<Host name="www.hy.com" appBase="D:/assets/deploy_hygg"
unpackWARs
="true" autoDeploy="true">
  <Context
path="" docBase="D:/assets/deploy_hygg/hygg" debug="0"
reloadable
="true" crossContext="true" />
 </Host>
apache的一些配置

############################
# include conf/extra/jsun.conf
############################
#为图片资源存放 虚拟目录
Alias /assets "d:/assets"
<Directory "d:/assets">
    Options Indexes FollowSymLinks MultiViews IncludesNoExec
    AddOutputFilter Includes html
    AllowOverride None
    order allow,deny
    Allow from all
</Directory>
Alias /stage "D:/assets/deploy/hy2/stage"
<Directory "D:/assets/deploy/hy2/stage">
    Options Indexes FollowSymLinks MultiViews IncludesNoExec
    AddOutputFilter Includes html
    AllowOverride None
    order allow,deny
    Allow from all
</Directory>
#配置一个目录为后面的虚拟主机和虚拟目录使用
Alias /hy2 "D:/assets/deploy/hy2"
<Directory "D:/assets/deploy/hy2">
    Options FollowSymLinks IncludesNOEXEC Indexes
    AllowOverride Options FileInfo 
    order allow,deny
    Allow from all
</Directory>
#配置一个目录为后面的虚拟主机和虚拟目录使用
Alias /hygg "D:/assets/deploy_hygg/hygg"
<Directory "D:/assets/deploy_hygg/hygg">
    Options FollowSymLinks IncludesNOEXEC Indexes
    AllowOverride Options FileInfo 
    order allow,deny
    Allow from all
</Directory>
#整合apache和tomcat------------------
#装载JK
LoadModule jk_module modules/mod_jk-1.2.31-httpd-2.2.3.so
JkWorkersFile "D:/jsun/apache-tomcat-6.0.29/workers.properties"
#配置JK_log
JkLogFile "D:/jsun/apache-tomcat-6.0.29/logs/mod_jk2.log"
JkLogLevel info
#整合apache2.2和php5--------------------
#我加载的PHP5的模块-------------
LoadModule php5_module "D:/jsun/php5/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "D:/jsun/php5"
####################################################
#配置域名
NameVirtualHost 58.53.128.20:80
<VirtualHost 58.53.128.20:80>
ServerName www.hongyizs.com
DocumentRoot "D:/assets/deploy/hy2"
RewriteEngine On
RewriteRule ^(.*);jsessionid=.*$ $1 
#ServerPath   /hy2
RedirectMatch ^/$ /index.jsf
#配置JK过滤 配置
JkMount /*.jsp worker1 
JkMount /*.do worker1
JkMount /*.jsf worker1
</VirtualHost>
##############################################################
####################################################
#钢构网站
#配置域名
NameVirtualHost 58.53.128.20:80
<VirtualHost 58.53.128.20:80>
ServerName www.hongyigg.com
DocumentRoot "D:/assets/deploy_hygg/hygg"
RewriteEngine On
RewriteRule ^(.*);jsessionid=.*$ $1 
#ServerPath   /hygg
#RedirectMatch ^/$ /index.jsf
#配置JK过滤 配置
JkMount /*.jsp worker1 
JkMount /*.do  worker1
JkMount /*.jsf worker1
JkMount /*/    worker1
JkMount /      worker1
</VirtualHost>
##############################################################
######################################
#discuz论坛
#配置虚拟主机
#配置域名
NameVirtualHost  58.53.128.20:80
<VirtualHost 58.53.128.20:80>
ServerName www.hkb178.com
DocumentRoot "D:/assets/discuz"
RedirectMatch ^/$ /index.php
#为discuz配置虚拟目录
Alias /discuz "D:/assets/discuz"
<Directory "D:/assets/discuz">
    Options FollowSymLinks IncludesNOEXEC Indexes
    AllowOverride Options FileInfo 
    order allow,deny
    Allow from all
</Directory>
</VirtualHost>
##########apache代理play#######################################
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
NameVirtualHost 58.53.128.20:80
<VirtualHost 58.53.128.20:80>
  ServerName www.hosinst.com
  ProxyPreserveHost On
  ProxyPass /assets/  !
  ProxyPassReverse /assets/ !
  ProxyPass / http://localhost:9000/
  ProxyPassReverse / http://localhost:9000/
  Alias /assets "d:/assets"
  <Directory "d:/assets">
    Options Indexes FollowSymLinks MultiViews IncludesNoExec
    AddOutputFilter Includes html
    AllowOverride None
    order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

 

抱歉!评论已关闭.