Apache22与opencms9.5集成配置

<VirtualHost *:80>

  DocumentRoot "D:\kindo\apache-tomcat-7.0.92\webapps\ROOT"
  ServerName www.kindo1.com.cn
  ServerAlias kindo.cn 121.50.86.XXX
  ServerAdmin admin@medto.cn

  # Allow accessing the document root directory
  <Directory D:\kindo\apache-tomcat-7.0.92\webapps\ROOT>
    Options FollowSymlinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>

  # Logging
  LogFormat "%h %l %u %t \"%r\" %>s %b" common
  CustomLog logs/access_kindo.log common
  ErrorLog logs/error_kindo.log
  RewriteLog logs/rewrite_kindo.log
  RewriteLogLevel 1

  # Do not forward the request if the requested URI is located in the resources folder or is static content
  SetEnvIfNoCase Request_URI ^/resources/.*$ no-jk
  SetEnvIfNoCase Request_URI ^/export/.*$ no-jk
  SetEnvIfNoCase Request_URI ^/kindoWebsite/.*$ no-jk

  # Turn rewriting on and define the rules
  RewriteEngine On

  # Deny access to php files in order to prevent reading resources
  RewriteCond %{REQUEST_FILENAME} (.+)\.php(.*)
  RewriteRule (.*) / [F]

  # If the requested URI is NOT located in the resources folder and is not static:
  # Prepend an /opencms to everything that does not already starts with it
  # and force the result to be handled by the next URI-handler ([PT]) (JkMount in this case)
  RewriteCond %{REQUEST_URI} !^/resources/.*$
  RewriteCond %{REQUEST_URI} !^/export/.*
  RewriteCond %{REQUEST_URI} !^/kindoWebsite/.*
  RewriteRule !^/opencms/(.*)$ /opencms%{REQUEST_URI} [PT]
  
  # These are the settings for static export. If the requested resource is not already
  # statically exported create a new request to the opencms404 handler. This has to be
  # a new request, because the current would not get through mod_jk because of the "no-jk".
  RewriteCond %{REQUEST_URI} ^/export/.*$
  RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}" !-f
  RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}/index_export.html" !-f
  RewriteRule .* http://www.kindo.com.cn/opencms/handle404?exporturi=%{REQUEST_URI}&%{QUERY_STRING} [P]

  # If the request starts with /resources, substitute the  prefix
  RewriteCond %{REQUEST_URI} ^/resources/.*$
  RewriteRule ^/(.*)$ /$1
  
  #RewriteRule ^/system/login.* http://www.kindo.com.cn/system/login/ [L,R]

  ErrorDocument 404 /system/handler/handle404.html

  JkMount /opencms/* ocms
  JkMount /opencms ocms

</VirtualHost>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

shibushi114

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值