二月 22 2014
[Apache Tomcat] Enhance security
我沒有在使用 Apache Tomcat 的後台,佈署軟體/程式都是透過 scp/sftp/ftp 等方式做傳輸。
所以在解開 Apache Tomcat 的壓縮檔之後,我會執行以下指令,把不必要的檔案清掉,增強安全性:
cd apache-tomcat-* && \ /bin/rm -rf webapps/docs webapps/examples webapps/host-manager webapps/manager && \ /bin/rm -f webapps/ROOT/*.gif webapps/ROOT/*.xml webapps/ROOT/*.ico webapps/ROOT/*.txt webapps/ROOT/*.svg && \ /bin/cat /dev/null > webapps/ROOT/index.jsp && /bin/cat /dev/null > webapps/ROOT/index.html
八月 25 2015
調整 Apache HTTPD & Apache Tomcat & nginx 的 content cache & compression
前陣子調整了一些 Apache HTTPD & Tomcat & nginx 的 cache 機制與內容壓縮機制,稍微紀錄一下。
Apache HTTPD 的 cache:
Apache HTTPD 的壓縮:
Tomcat 的 cache(在 application 的 web.xml 做調整):
Tomcat 的壓縮(在 conf/server.xml 做調整):
nginx 的 cache(在 server tag 內做調整):
nginx 的壓縮(在 http tag 內做調整):
大概就調這些,其他多媒體檔案就看需求了…
By Joe Horn • WWW • • Tags: Apache HTTPD, Apache Tomcat, cache, compression, deflate, gzip, nginx