apache2 resin3 linux

编译apache

编译resin

编译jdk


apache

1. 修改
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

2.加缓存
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 minutes"
ExpiresByType text/html "access plus 1 days"
ExpiresByType text/css "access plus 7 days"
ExpiresByType text/javascript  "access plus 7 days"
ExpiresByType image/gif "access plus 7 days"
ExpiresByType image/jpeg "access plus 7 days"
ExpiresByType image/jpg "access plus 7 days"
ExpiresByType image/png "access plus 7 days"
ExpiresByType image/ico "access plus 1 months"
ExpiresByType application/x-shockwave-flash "access plus 7 days"
ExpiresByType application/x-javascript      "access plus 7 days"
ExpiresByType application/javascript      "access plus 7 days"
ExpiresByType video/x-flv "access plus 7 days"
</IfModule>


TraceEnable off

FileETag none

DeflateCompressionLevel  6
AddOutputFilter DEFLATE html xml php js css

<Location />
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \\.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .(?:pdf|mov|avi|mp3|mp4|rm)$ no-gzip dont-vary

Header append Vary User-Agent env=!dont-vary
</Location>

3. 打开http-vhost
Include conf/extra/httpd-vhosts.conf

4. httpd-vhost

Listen 9003

NameVirtualHost *:9003

<VirtualHost *:9003>
    ServerAdmin [email protected]
    DocumentRoot /home/$path/webapp
    ServerName sitedomain.com
    ErrorLog logs/error_log
    CustomLog logs/access_log common
    ResinConfigServer 127.0.0.1 5101
    ResinConfigServer 127.0.0.1 5102
    CauchoStatus yes
    <Location /dianping/*.xhtml>
        SetHandler caucho-request
    </Location>

 
RewriteEngine On
RewriteRule ^/(xxx/.*)$ /xxx.xxx/$1 [QSA,PT]
RewriteRule ^/(xxxx/.*)$ /xxx.xxxx/$1 [QSA,PT]



<Directory "/home/$path/webapp/WEB-INF">
    Order allow,deny
    Deny from all
</Directory>
</VirtualHost>

resin
1. resin1.conf
   <server id="name1" address="127.0.0.1" port="5101"  />
   <server id="name2" address="127.0.0.1" port="5102"  backup="true"/>


     <web-app id="/" root-directory="/home/$path/webapp">
        <stdout-log path="/home/$path/log/stdout1.log" />
        <stderr-log path="/home/$path/log/stderr1.log" />
     </web-app>

2.bin/start.sh stop.sh
#!/bin/sh
WORK_PATH=/home/xxxSystem

RESIN_HOME=/home/frontSoft/resin-3.1.9
JAVA_HOME=/home/frontSoft/jdk1.6.0_13

export RESIN_HOME CLASSPATH JAVA_HOME

$RESIN_HOME/bin/httpd.sh -server name1 -conf $WORK_PATH/conf/resin1.conf start



同步js css image
rsync -azr -e'ssh -p 22352' -vrtL --delete --progress 
--include-from "/$path/xxxSystem/include.txt"  
--exclude "*" /home/$patht/webapp/ 
[email protected]:/home/$path/img

include.txt

js/
css/
js0/
images/
booking/
comment/
cnnic/
js/*
css/*
js0/*
images/*
booking/*
comment/*




你可能感兴趣的:(JavaScript,linux,css,ssh,Access)