nginx与tomcat结合,动静分离
我们的网站是nginx+tomcat架构,前端用nginx来处理静态内容,动态的全交给tomcat来处理。之前的SA配置太过于简单,而且没有仔细梳理网站的流程。nginx与tomcat的安装就不说了,很easy,直接贴配置文件,作个笔记 nginx虚拟主机段配置 server{ listen80; server_namewww.xxxx.com192.168.8.62; indexindex.htmlindex.htmindex.action; root/var/www/; if($document_uri~*"\.xhtml$"){ rewrite^/(.*).xhtml$/$1.actionlast; } location~*\.(action|svl)?${ includeproxy.conf; proxy_redirectoff; proxy_passhttp://127.0.0.1:8080; } location~(favicon.ico){ log_not_foundoff; expiresmax; } location~*^/(WEB-INF)/{ denyal...
