因为有很多汉字需要编码所以选择gbk
============================================================================
URIEncoding="GBK"
/etc/profile
=============================================================================
export PATH
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/mysql-connector-java-5.1.12-bin.jar
umask 022
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/var/run/apache2.pid
server.xml
==============================================================================
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
***.com
debug="5" reloadable="true" crossContext="true">
sites-enabled
=================================================================================
ServerName www.***.com
ServerAlias *.***.com ***.com
ServerAdmin webmaster@localhost
DocumentRoot /opt/sites/***.com
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
ErrorLog /var/log/apache2/***.access.error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/***.access.log combined
Alias /doc/ "/usr/share/doc/"
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
# Alias /examples "/usr/share/tomcat6-examples/examples/"
#
# Options Indexes MultiViews FollowSymLinks
# AllowOverride None
# Order deny,allow
# Allow from all
#
# #禁止访问WEB-INF文件夹
#
# Order allow,deny
#
JkMount /*.jsp ajp13_worker
JkMount /*.jspx ajp13_worker
JkMount /*/servlet/* ajp13_worker
JKMount /*.do ajp13_worker
=================================================================================
# Sample mod_jk configuration
# for Apache 2
#
# for all commands/options available see the manual
# provided in libapache-mod-jk-doc package.
# The location where mod_jk will find the workers definitions
JkWorkersFile /etc/libapache2-mod-jk/workers.properties
# The location where mod_jk is going to place its log file
JkLogFile /var/log/apache2/mod_jk.log
# The log level:
# - info log will contain standard mod_jk activity (default).
# - warn log will contain non fatal error reports.
# - error log will contain also error reports.
# - debug log will contain all information on mod_jk activity
# - trace log will contain all tracing information on mod_jk activity
JkLogLevel info
# Assign specific URLs to Tomcat. In general the structure of a
# JkMount directive is: JkMount [URL prefix] [Worker name]
# send all requests ending in .jsp to ajp13_worker
JkMount /*.jsp ajp13_worker
# send all requests ending /servlet to ajp13_worker
JkMount /*/servlet/ ajp13_worker
# JkUnmount directive acts as an opposite to JkMount and blocks access
# to a particular URL. The purpose is to be able to filter out the
# particular content types from mounted context.
# do not send requests ending with .gif to ajp13_worker
#JkUnMount /servlet/*.gif ajp13_worker
# JkMount / JkUnMount directives can also be used inside
# sections of your httpd.conf file.
=================================================================================
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=localhost
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
~
编辑特别推荐:来源:考试大-Java认证
责编:xxm 评论 纠错