apache mina

http://mina.apache.org/ Apache MINA is a network application framework which helps users develop high performance and high scalability network applications easily. It provides an abstract ·event-driven · asynchronous API over various transports such as TCP/IP and UDP/IP via Java NIO. Apache MINA is often called: NIO framework · library, client · server framework · library, or a networking · socket library. MINA is a simple yet full-featured network application framework which provides: Unified API for various transport types: TCP/IP & UDP/IP via Java NIO Serial communication (RS2...  more

优化博客的访问速度

########################################### # @auth guoguo,tianjiaguo#tianjiaguo.com 2011-03-27 20:18 # 添加浏览器缓存及压缩文件传输 ########################################### 添加如下模块(mod_deflate ,mod_expires) /usr/local/apache2/bin/apxs -i -a -c ~/software/httpd-2.2.17/modules/metadata/mod_expires.c /usr/local/apache2/bin/apxs -i -a -c ~/software/httpd-2.2.17/modules/filters/mod_deflate.c 检查配置: LoadModule deflate_module modules/mod_deflate.so LoadModule expires_module modules/mod_expires.so 添加如下配置: <IfModule mod_expires.c> ExpiresActive On #ExpiresDefau...  more

给wordpress配置apache的ssl安全登录

查看系统安装openssl版本及支持的加密 openssl version -a openssl ciphers -v 生成证书 openssl genrsa -des3 1024 > server.key openssl rsa -in server.key -out server.key openssl req -new -key server.key -out server.csr openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 740 chmod 400 server.key # 查看 openssl x509 -noout -text -in server.crt 修改httpd-ssl.conf ... DocumentRoot "/home/wordpress/" ServerName www.tianjiaguo.com:443 ServerAdmin admin@tianjiaguo.com .... #SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLProtocol all -SSLv2...  more

flex一些有用的方法

HttpService提交数据 var httpService:HTTPService; httpService = new HTTPService(); httpService.method = 'POST'; httpService.addEventListener(FaultEvent.FAULT, httpService_faultHandler); httpService.addEventListener(ResultEvent.RESULT, httpService_resultHandler); httpService.url = url; var obj:Object = new Object(); httpService.request = obj; httpService.send(); 取得一个随机字串 public static function getRandomString(length:int,allowStrs:String):String{ var str:String = ''; var len:int = allowStrs.length; for (var i:int = 0; i < length; i++) { str+=allowStrs.charAt(Math.round...  more

apache带查询参数转发设置

举个例子: RewriteCond %{QUERY_STRING} ^(.+)$ RewriteRule ^/guogou/(.+)/?$ /guogou/view-guogou.do?permalink=$1&$2 [QSA,PT] RewriteRule ^/guogou/(.+)/?$ /guogou/view-guogou.do?permalink=$1[L,PT] $("document").ready(function(){ prettyPrint(); $("pre.prettyprint").each(function(){ $(this).find("span").first().prepend(""+1+""); $(this).find("span br").each(function(i){ $(this).after(""+(i+2)+""); }); }); });   more

配置gzip压缩(apache)

根据apache版本编译模块:mod_deflate # /usr/local/apache2/bin/apxs -i -c /home/software/httpd-2.2.9/modules/filters/mod_deflate.c 添加如下配置: #gzip LoadModule deflate_module modules/mod_deflate.so <IfModule mod_deflate.c> DeflateCompressionLevel 7 AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php AddOutputFilter DEFLATE css js #DeflateFilterNote Input instream #DeflateFilterNote Output outstream #DeflateFilterNote Ratio ratio #LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate #CustomLog logs/deflate_log.log deflat...  more

linux安装配置

linux安装基本环境的记录,主要用于以后自己安装方便,记录于此。 ############################## # 配置root可以使用ssh ############################## # vi /etc/ssh/sshd_config PermitRootLogin yes ############################### ## 安装jdk ## jdk….bin在/home目录下,安装到/usr/local下,并建立符号连接 ############################### # chmod u+x jdk....bin # cd /usr/local # /home/jdk....bin # ln -s jdk1.6.0_17/ jdk1.6 # ln -s jdk1.6.0_17/jre/ jre1.6 # vim /etc/profile JAVA_HOME=/usr/local/jdk1.6 JRE_HOME=/usr/local/jre1.6 PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin CLASSPATH=.:$JAVA_HOME/lib...  more

eclipse中跑tomcat的out of memory的处理办法

修改Open launch configuration中的VM arguments增加了红色字的配置 -Dcatalina.base="...\.metadata\.plugins\org.eclipse.wst.server.core\tmp1" -Dcatalina.home="E:\dev\apache-tomcat-5.5.25" -Dwtp.deploy="...\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps" -Djava.endorsed.dirs="E:\dev\apache-tomcat-5.5.25\common\endorsed" -server -XX:PermSize=500M -XX:MaxPermSize=800m 运行intellij出现内存错误时可配置vm参数:-Xms64m -Xmx512m SyntaxHighlighter.all();   more

tomcat链接乱码

<Connector URIEncoding="UTF-8" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="8083" redirectPort="8443"/> <Connector URIEncoding="UTF-8" enableLookups="false" port="9009" protocol="AJP/1.3" redirectPort="8443"/> 两个地方都要配置,之前出现没有配置9009 AJP的结果就出现乱码了。 $("document").ready(function(){ prettyPrint(); $("pre.prettyprint").each(function(){ $(this).find("span").first().prepend(""+1+""); $(this).find("span br...  more

net.sf.cglib.proxy.Enhancer 错误

配置日志出了错误,打出一堆的日志。 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casProcessingFilter ... Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casAuthenticationManager' ... Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casAuthenticationProvider' ... Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'statelessTicketCache' ... Caused by: org.springframework.beans.factory.BeanCreationExcept...  more

apache配置php,mysql

windows下面配置Apache、PHP和MySQL结合: apache目录下libmysql.dll,php5ts.dll拷贝到win目录 修改httpd.conf: # 基于模块 DirectoryIndex index.html index.htm index.ph LoadModule php5_module E:/dev/php5.2.9.2/php5apache2_2.dll AddType application/x-httpd-php .php .phtml .php3 .php4 # cgi ScriptAlias /php/ “d:/php/” AddType application/x-httpd-php .php Action application/x-httpd-php “/php/php-cgi.exe” 拷贝php.ini-dist到win并改名php.ini 修改: extension=php_mysql.dll extension_dir = "E:/dev/php5.2.9.2/ext" session.save_path = "F:/dev/session" 拷贝php_mysql.dll到system32目录 编写测试页面: ...  more