请教mod jk.so apache2.42+MOD

请教如何升级apache-2.2.6的mod_百度知道
请教如何升级apache-2.2.6的mod
提问者采纳
以单独下载新版本的mod_ssl来编译,编译时注意--with-apxs就可以,如果有疑问可以查看;configure --help如果你要删除就更简单了.&#47
来自团队:
其他类似问题
为您推荐:
apache的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁Apache mod_rewrite - Apache HTTP Server Version 2.2
& Please note
This document refers to a legacy release (2.2) of Apache httpd. The active release (2.4) is documented . If you have not already upgraded, please follow
for more information.
You may follow
to go to the current version of this document.Apache mod_rewrite
Available Languages:
provides a way to modify incoming
URL requests, dynamically, based on
rules. This allows you to map arbitrary URLs onto
your internal URL structure in any way you like.
It supports an unlimited number of rules and an
unlimited number of attached rule conditions for each rule to
provide a really flexible and powerful URL manipulation
mechanism. The URL manipulations can depend on various tests:
server variables, environment variables, HTTP
headers, time stamps, external database lookups, and various other
external programs or handlers, can be used to achieve granular URL
Rewrite rules can operate on the full URLs, including the path-info
and query string portions, and may be used in per-server context
(httpd.conf), per-virtualhost context ( blocks), or
per-directory context (.htaccess files and
blocks). The
rewritten result can lead to further rules, internal
sub-processing, external request redirection, or proxy
passthrough, depending on what
attach to the rules.
Since mod_rewrite is so powerful, it can indeed be rather
complex. This document supplements the , and
attempts to allay some of that complexity, and provide highly
annotated examples of common scenarios that you may handle with
mod_rewrite. But we also attempt to show you when you should not
use mod_rewrite, and use other standard Apache features instead,
thus avoiding this unnecessary complexity.
Available Languages:Create & Self-Host Websites in 60 Seconds!
With Advanced, High-Performance Web Server Software using Apache, PHP, MySQL - for Windows
WampDeveloper Pro enables professionals, average users, and businesses to rapidly create & deploy websites using Apache (web server), PHP (language), and MySQL (database).
With WampDeveloper Pro creating websites is a 1-click process.
A complete web development and website hosting platform on which to create standards-based dynamic HTML + CSS + JavaScript sites running on PHP and MySQL!
Performance Optimized. Secured. And Fully Supported!
Built on standards and best-practices, with 7+ years of web-development and website hosting experience! (since 2003)
Now comes standard with WordPress, Drupal, Joomla, Magento, phpBB and MediaWiki (1-click install in any website and URL)!
Host websites after a simple 60 seconds 1-click installation!
System Tab - Control Apache, MySQL, and other Services. Get web server status reports. IP information. And much more.
Websites Tab - Add and manage websites with a single click.
Local DNS Tab - Select DNS settings for your websites.
Web Applications Tab - Automatically install WordPress, Drupal, Joomla, Magento, phpBB3, and MediaWiki.
Proxy Pass Tab - Proxy specific requests to backend Tomcat, IIS, and Nginx servers.
Components Tab - Select versions of Apache, PHP, and MySQL to use with a single click.
Building Apache 2.2.3 or 2.0.59, with mod_ssl, mod_security, mod_deflate
Building a Web Server, for Windows
Requirements
Microsoft Visual C++
[we will use Visual Studio 98 / VC++ 6.0]
[Visual Studio .NET will also work with the same instructions]
[needed for the Apache2 build process]
[optional] zlib : mod_deflate source
[optional] OpenSSL : mod_ssl source
Perl[native Perl, not Cygwin Perl]
Additional build tools: bison, flex, sed
[optional] mod_security source
Package(win32 source):
-- Unpack as C:\build\httpd-2.2.3
-- Unpack as C:\build\httpd-2.0.59
Gawk, bison, flex, sed : can be downloaded as stand alone win32 ports from GnuWin32 or with the Cygwin environment. Do not use UnxUtils.
Pre-packaged DeveloperSide.NET distribution of the required GnuWin32 tools:
[Download and add directory 'C:\GnuWin32\bin' to the PATH]
GnuWin32 :
[Note that only Bison
will work from GnuWin32 for this build, and will require
Download zlib source code, v1.2.3, from :
Unpack as C:\build\httpd-2.x.x\srclib\zlib
Download OpenSSL source code, v0.9.8b, from :
Unpack as C:\build\httpd-2.x.x\srclib\openssl
Download mod_security source code, v1.9.4, from :
Unpack as C:\build\modsecurity-apache-1.9.4
Our Configuration
Build directory : C:\build
Install to:
Apache 2.0: C:\www\Apache2
Apache 2.2: C:\www\Apache22
System:Port : localhost:80
Module type : dynamically loaded modules, *.so (and *.dll)
[optional] Additional modules over base : mod_deflate, mod_ssl, mod_security
Perl.exe path : C:\www\perl\bin
awk, bison, flex, sed path : C:\GnuWin32\bin
[Read below 'Notes' for clarification on gawk/awk]
System PATH : contains C:\www\perl\bin and C:\GnuWin32\bin
[Read below 'Notes' for clarification on system path]
When using the command-line (command-shell) with VC++, always set the Build Environment and update the System PATH to reflect the tools used in the build --& Guide: Working with the Command Shell
This Guide can be used without the inclusion of modules mod_ssl, mod_security, and mod_deflate -- simply ignore the related Sections, material, and tools
The System PATH must contain the path to perl.exe and the other build tools
file 'gawk.exe' must be renamed to 'awk.exe' for the Apache2 build process
If using Cygwin 'gawk', delete the symlink 'awk.exe' and rename 'gawk.exe' to 'awk.exe' under ...\cygwin\bin
Setup for mod_deflate
To build mod_deflate, the zlib source code directory is placed under C:\build\httpd-2.x.x\srclib (as httpd-2.x.x\srclib\zlib). The main Apache 2.0/2.2 build process will automatically compile the zlib source code and build mod_deflate. Note that to build zlib v1.2.3 under Apache 2.0, the C:\build\httpd-2.0.x\modules\filters\mod_deflate.dep/dsp/mak files will need to be patched. Do NOT perform this patching step if building mod_deflate under Apache 2.2, or if building against zlib v1.1.4.
Patch mod_deflate (zlib 1.2.3) to build under Apache 2.0...
Download package
(binary zip or setup) and install, making sure that patch.exe can be located under the PATH and that libs libiconv-2.dll and libintl-2.dll are under the same directory as the patch binary.
[the patch utility is provided under the DeveloperSide.NET GnuWin32 tools distribution]
file as C:\build\httpd-2.0.x\zlib.patch
...\httpd-2.0.x& patch -p1 & zlib.patch
[Optional] Build zlib with ASM options...
...\httpd-2.x.x\srclib\zlib\contrib\masmx86& mkasm.bat
Copy files gvmat32.obj, inffas32.obj, gvmat32c.obj to the base zlib directory.
...\httpd-2.x.x\srclib\zlib& nmake -f win32\Makefile.msc LOC=&-DASMV -DASMINF& OBJA=&gvmat32c.obj gvmat32.obj inffas32.obj&
Setup for mod_ssl
To build mod_ssl, the OpenSSL source code directory is placed under C:\build\httpd-2.x.x\srclib (as httpd-2.x.x\srclib\openssl). The OpenSSL source is then manually compiled to prepare for the main Apache 2.0/2.2 build process.
Configure the build...
['--openssldir=DIR' tells openssl.exe where to look f]
[we must use unix forward style slashes(/), instead of windows style back slashes(\)]
& cd /d C:\build\httpd-2.x.x\srclib\openssl
For Apache 2.2& perl Configure --openssldir=C:/www/Apache22/bin VC-WIN32
For Apache 2.0& perl Configure --openssldir=C:/www/Apache2/bin VC-WIN32
Use x86 assembly functions for performance improvements...
Note that if your Compiler or System does not include MASM (ml.exe error): run 'ms\do_ms' instead.
& ms\do_masm
& nmake -f ms\ntdll.mak
[optional] Test the built OpenSSL package...
& cd out32dll
& ..\ms\test
Apache 2.2.3 Patch
The Apache 2.2.3 Windows source has problems in four projects dsp and mak files. Also, a perl script has to be run to convert the projects to the VC++ version that is being used to compile the code. Both of these problems should be fixed under Apache 2.2.4
and extract the following 4 dsp and mak project files to the given directories...
modules/aaa/mod_authn_dbd.dsp\mak
modules/filters/mod_ext_filter.dsp\mak
modules/metadata/mod_usertrack.dsp\mak
support/htpasswd.dsp\mak
If using VS.NET 2005 to compile Apache 2.2.3, download
and run 'perl cvtdsp.pl -2005' (For VC++ 6.0: 'perl cvtdsp.pl -6' but this is unnecessary).
Build/Install Apache
Apache 2.0/2.2 can be built using the command line, or with the Visual Studio Workspace IDE. The command line build is the perfered choice.
Command-Line Build Instructions
Build Apache 2.0/2.2 in Release mode under C:\www\Apache22 (for 2.2) or C:\www\Apache2 (for 2.0), with the server listening on localhost (127.0.0.1, your local system) on port 80 (regular HTTP port).
For Apache 2.2...\httpd-2.2.x& nmake /f Makefile.win SERVERNAME=&localhost& PORT=80 INSTDIR=&C:\www\Apache22& installr
For Apache 2.0...\httpd-2.0.x& nmake /f Makefile.win SERVERNAME=&localhost& PORT=80 INSTDIR=&C:\www\Apache2& installr
Visual Studio Workspace IDE Build Instructions
Apache.dsw is the Visual Studio workspace, which exposes the entire list of working .dsp projects that are required for the complete Apache 2.0/2.2 binary release.
Load Apache.dsw
&The project Apache.dsp needs to be converted to the Visual C++ 7.0 project format&
Click 'Yes To All'
Right click 'BuildBin' under Solution Explorer
Select 'Set as StartUp Project'
Select 'Solution 'Apache'' under Solution Explorer
Change 'Active Config' value under Properties Window from 'Debug' to 'Release'
[If you are not building mod_ssl and mod_deflate] Note that by default, under the IDE build, the build process will try to build modules abs, mod_ssl, and mod_deflate. If the source code and libs of the additional modules have not been provided, the mentioned modules will need to be deselected.
Under the Build menu, select Configuration Manager
Deselect 'abs', 'mod_deflate', 'mod_ssl'
Click 'Close'
Note that with the Workspace IDE build, by default, Apache 2.0/2.2 is installed into &drive&:\Apache2. We are installing to &drive&:\www\Apache22 (for 2.2) or to &drive&:\www\Apache2 (for 2.0).
For 'BuildBin' and 'InstallBin' -- Right click each under Solution Explorer and perform these steps
Select 'Properties'
Select 'NMake' under 'Configurations Properties'
Update : 'Build Command Line', 'Rebuild All Command Line', 'Output'
Replace &\Apache2\...& with &\www\Apache22\...& (for 2.2) or &\www\Apache2\...& (for 2.0)
Click 'OK'
Select 'Build Solution' under the Build menu
Setup for mod_security
To build mod_security, the built Apache2 libraries and include files are used...
Edit file C:\build\modsecurity-apache-1.9.4\apache2\makefile.win and change the BASE path to the built Apache2 dir...
Apache 2.2BASE = &C:/www/Apache22/&
Apache 2.0BASE = &C:/www/Apache2/&
If building against Apache 2.2, edit file C:\build\modsecurity-apache-1.9.4\apache2\makefile.win and update the following line to reflect the new Apache 2.2 library names...
Original lineLIBS = $(BASE)\lib\libhttpd.lib $(BASE)\lib\libapr.lib $(BASE)\lib\libaprutil.lib
Updated lineLIBS = $(BASE)\lib\libhttpd.lib $(BASE)\lib\libapr-1.lib $(BASE)\lib\libaprutil-1.lib
Build mod_security...
...\modsecurity-apache-1.9.4\apache2& nmake /f makefile.win
Copy generated file mod_security.dll to dir C:\www\Apache[2,22]\modules and file mod_security.lib to dir C:\www\Apache[2,22]\lib
Additional Steps and Information
During the Apache 2.0/2.2 build process, the needed OpenSSL files (libeay32.dll, ssleay32.dll, openssl.exe) are placed into C:\www\Apache[2,22]\bin, f. f is the OpenSSL configuration file. This file needs be copied manually....
From directory ...\httpd-2.x.x\srclib\openssl\apps copy f to C:\www\Apache22\bin (2.2) or C:\www\Apache22\bin (2.0)
[note that .cnf file extensions are invisible, by default, on Windows 2000/XP]
Apache v2.x (win32) file ssl.conf contains a syntax problem that needs to be addressed....
Change 'SSLMutex file:logs/ssl_mutex' under ssl.conf to 'SSLMutex default'
[the default 'file:logs/ssl_mutex' option is not available under win32]
Update Configuration Files
Now that the Apache httpd Web-Server has been successfully built -- [before proceeding with startup] configuration file httpd.conf will need to be updated (for mod_deflate and other changes) and an
will need to be created (for mod_ssl)...
Note that if &localhost& will be used, make sure that file %SystemRoot%\system32\drivers\etc\hosts contains line...
127.0.0.1 &tab& localhost
mod_deflate requires several additions and updates to be made to httpd.conf, the Apache 2.0/2.2 configuration file.
Open C:\www\Apache[2,22]\conf\httpd.conf, add...
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
&IfModule deflate_module&
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
LogFormat '&%r& %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
CustomLog logs/deflate.log deflate
&Location /&
AddOutputFilterByType DEFLATE text/html text/plain text/css
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
&IfModule headers_module&
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
&/IfModule&
&/Location&
&/IfModule&
The default Apache DocumentRoot/Webroot is set to ...\Apache22\htdocs (for 2.2) or ...\Apache2\htdocs (for 2.0) -- our Guides and our Web-Server Suite has this changed to \www\webroot -- update DocumentRoot if you are also going to use our other Guides. Note that when testing Apache, you will need to make/copy index.html and/or other files into the new directory, as it will be empty.
Open C:\www\Apache[2,22]\conf\httpd.conf...
Locate line DocumentRoot &/www/Apache[2,22]/htdocs&, replace with...
DocumentRoot &/www/webroot&
Locate line &Directory &/www/Apache[2,22]/htdocs&&, replace with...
&Directory &/www/webroot&&
Startup and Operation
Executables 'httpd.exe' (for 2.2) and 'apache.exe' (for 2.0) are located under directory 'C:\www\Apache22\bin' (for 2.2) or 'C:\www\Apache2\bin' (for 2.0) - which should be included into the System PATH. If this dir is not in the PATH, 'httpd.exe' or 'apache.exe' should be run from a command line that is under 'C:\www\Apache[2,22]\bin'.
Install the 'Apache2' Service...
[this will start 'Apache2' automatically from now on, but not the first time]
['-D SSL' option will cause Apache to load mod_ leave this out if mod_ssl is not needed]
Apache 2.2: & httpd -D SSL -k install
Apache 2.0: & apache -D SSL -k install
Start the 'Apache2' Service...
[or use 'net start Apache2']
Apache 2.2: & httpd -k start
Apache 2.0: & apache -k start
Additional Commands...
Stop 'Apache2' Service...
[or use 'net stop Apache2']
Apache 2.2: & httpd -k stop
Apache 2.0: & apache -k stop
Graceful restart 'Apache2' Service...
Apache 2.2: & httpd -k restart
Apache 2.0: & apache -k restart
Uninstall 'Apache2' Service...
Apache 2.2: & httpd -k uninstall
Apache 2.0: & apache -k uninstall
To test the regular (port 80) server enter url :
To test the SSL (port 443) server enter url :
To test Server via telnet...
Run 'cmd.exe', execute 'telnet'
(Windows 2000)Microsoft Telnet& set LOCAL_ECHO
(Windows XP)Microsoft Telnet& set LOCALECHO
Microsoft Telnet& open localhost 80
HEAD / HTTP/1.0 (enter)(enter)Ubuntu 12.04 + Apache2.2.22搭建SPDY服务器 – 默默的点滴
SPDY是Google开发的基于传输控制协议(TCP)的应用层协议,该协议规定在一个SPDY连接内可以有无限个并行请求,服务器可以主动向客户端发起通信向客户端推送数据,通过请求优化、预加载、压缩HTTP 来达到加速的目的。
对用记而言,SPDY是基于SSL加密,它可以让网络访问更安全,用户隐私更加得到保护。对站长而言,SPDY在降低连接数目的同时,还使服务器上每个客户端占用的资源减少,从释放出更多内存和CPU ,让网站的浏览速度提升不少。
SPDY协议已经被Chrome、Firefox、Opera、IE 11以上支持,用户在访问使用SPDY协议加载的网站几乎感觉不到与普通的Https页面访问有何不同,而SPDY带来的页面加载速度提升和服务器性能优化确是有十分重要意义的。
具体的操作步骤如下:
启用Apache2的HTTPS支持
下载Apache2的mod_spdy模块
由于众所周知的原因,本站提供下载(版本)
安装mod_spdy模块(本站是64位系统)
$sudo dpkg -i mod-spdy-*.deb
$sudo apt-get -f install
$sudo dpkg -i mod-spdy-*.deb$sudo apt-get -f install
重启Apache2
$sudo service apache2 restart
$sudo service apache2 restart
目前验证貌似没有起作用啊!目前最新的chrome已经没办法进行验证了,主要是由于HTTP/2已经发布,Google放弃了spdy,转而支持HTTP/2,还是静待新版本的HTTP/2吧。
$sudo dpkg -r mod-spdy-beta
$sudo dpkg -P mod-spdy-beta
$sudo dpkg -r mod-spdy-beta$sudo dpkg -P mod-spdy-beta2885人阅读
Load Balance
weblogic(12)
Cluster(1)
Apache(4)
实现Load Balance 有多种方式,既有软件方式也有硬件方式,硬件方式主要是用负载均衡硬件,比如F5,对于大型的企业部署主要采用此种方式。软件方式也有很多,比如说Apache。
本文详细介绍Apache的安装以及Load Balance的简单配置。
OS:Redhat Linux 5.5& x86_64 总共三台(其中两台部署Weblogic应用并实现Cluster、一台专门部署Apache)
Software:Apache&&2.2.22、Weblogic 10.3.5
一、weblogic的安装、应用部署、集群的搭建
&&&&& 此内容不包含在该文章中,具体内容请参考相关文档,本示例部署的是OBIEE 11.1.1.5.0并且 搭建了集群。略。
二、Apache的安装
&&&& 1、下载地址:,本文下载的是:httpd-2.2.22.tar.gz,下载后解压到相应的目录
&&&&&&&解压命令: tar -zxvf httpd-2.2.14.tar.gz
&&&& 2、进入到解压后的Apache安装文件目录,并执行相应的命令
&&&&&&[apache@fmw1 ~]$ cd /app/software/httpd-2.2.22
&&&& &[apache@fmw1 httpd-2.2.22]$ ./configure --prefix=/app/apache --enable-module=so
&&&&& [apache@fmw1 httpd-2.2.22]$ make
&&&&& [apache@fmw1 httpd-2.2.22]$ make install&&&&&
&&&&& [apache@fmw1 httpd-2.2.22]$ sudo /app/apache/bin/apachectl start
&&&&& [sudo] password for apache:
&&&&& 注:必须sudo,因为启动的时候要用到许多root的权限
&&&& 辅助命令:
&&&&& 1)检测 80端口是否起来监听
&&&&&&&&&&&& [apache@fmw1 httpd-2.2.22]$ netstat -tnl
&&&&& 2)停止Apache& sudo /app/apache/bin/apachectl stop
&&&&& 3)重启Apache& sudo /app/apache/bin/apachectl restart
&&&& 如果正常起来了,用浏览器验证一下 ,
,如果浏览器里显示 &It Works! & , 说明安装成功
&&&& 3、拷贝weblogic 模块文件到Apache
&&&&&& 文件所在路径:$weblogic_home/wlserver_10.3/server/plugin/linux/x86_64/mod_wl_22.so
&&&&&& 将该文件拷贝到如下路径:/app/apache/modules
&&&& 4、修改httpd.conf
&&&&& 修改文件:/app/apache/conf/httpd.conf
&&&&& 在最后面添加如下内容:
&&&&& LoadModule weblogic_module modules/mod_wl_22.so
&&&&& &IfModule mod_weblogic.c&
&&&&& WebLogicCluster 192.168.8.131:.8.132:9704
&&&&& MatchExpression *.jsp
&&&&& MatchExpression *.*
&&& & MatchExpression *
&&&& &/IfModule&
&&&& 保存。
&&& 5、重启Apache
&&&&6、测试,通过apache访问部署在weblogic上的应用,如果可以访问表示配置成功
&&& 该Apache使用的默认端口80,因此测试应用的时候使用如下链接:
&&& &在使用Apache之前:
&& & 在使用Apache之后:
&&& 通过使用上述配置,实现了负载均衡
&&&& 7、使用apache的ab工具模拟并发请求
&&&& #ab -n1000 -c10
&&&& &模拟10个并发,共1000个请求
&&&& 上述只是简单的Apache+Weblogic集群配置,如果具体生产环境部署,还需要做很多的配置,比如说session replication,session sticky etc.到时候要具体问题具体分析。
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:264643次
积分:3685
积分:3685
排名:第5951名
原创:74篇
转载:160篇
评论:21条
(5)(2)(2)(1)(10)(24)(2)(1)(3)(4)(1)(8)(1)(3)(4)(10)(1)(4)(1)(11)(12)(13)(31)(24)(1)(35)(19)}

我要回帖

更多关于 apache mod jk 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信