http://blog.chinaunix.net/uid-7530389-id-2050054.html
http://blog.sina.com.cn/s/blog_4a7318860100b3b8.html
http://blog.sina.com.cn/s/blog_70ac6bec01018mqs.html
http://os.51cto.com/art/200709/55149.htm
感谢以上的博主,我是新手,我自己留下笔记,方便自己学习
以上我今天下载的jar,有图为证,都是最新的。
关于java,还有tomcat的配置,我就不介绍了,这不难
修改tomcat的conf-》server.xml文件
<!-- appBase="webapps"--> <!-- 修改路径地址--> <Host name="localhost" appBase="E:\webroot" unpackWARs="true" autoDeploy="true"> <!-- SingleSignOn valve, share authentication between web applications Documentation at: /docs/config/valve.html --> <!-- <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> --> <!-- Access log processes all example. Documentation at: /docs/config/valve.html Note: The pattern used is equivalent to using pattern="common" --> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t "%r" %s %b" /> <!--具体项目路径--> <Context path="/" docBase="cecWeb_war_exploded" debug="0" privileged="true" reloadable="true"> <!-- 数据库 <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="javauser" password="javadude" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/> --> </Context> </Host>
具体含义,我不做解析了。可以参考别的博客
另外,修改apcache-》conf->httpd.conf,核心部分修改,自己定位到
# Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. #修改ip #Listen 12.34.56.78:80 Listen 192.968.520.107:80(我这个是虚拟机,我不怕你们攻击,其实我是在骗你们) ====================== # If your host doesn‘t have a registered DNS name, enter its IP address here. #域名,不用多说来吧 #ServerName www.example.com:80 ServerName mmlocalhost:80 ================================== <Directory /> #Options FollowSymLinks Options Indexes FollowSymLinks Includes ExecCGI AllowOverride None #Order allow,deny #Allow from all </Directory> ============================================ # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # <IfModule dir_module> DirectoryIndex index.jsp </IfModule> ======================================================= # Example: # LoadModule foo_module modules/mod_foo.so # Load JK Connector Module LoadModule jk_module modules/mod_jk.so ===================================== <IfModule jk_module> #Load mod_jk #Configure mod_jk JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel info #将所有servlet 和jsp请求通过ajp13的协议送给Tomcat,让Tomcat来处理 JkMount /*/servlet/* worker1 JkMount /*.jsp worker1 JkMount /*.action worker1 JkMount /*.do worker1 JkMount /*.class worker1 JkMount /*.jar worker1 </IfModule>
另外workers.properties
# Defining a worker named worker1 and of type ajp13 worker.list=worker1 # Set properties for worker1 worker.worker1.type=ajp13 worker.worker1.host=127.0.0.1 worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=300
关于那个jk版本已经不像以前那样,也可以参考摸索下不难,不懂可以质询我QQ709847739
时间: 2024-11-10 01:17:32