问题描述
server{listen80;server_namefanjianlu.com;server_namewww.fanjianlu.com;root/home/webfile;indexindex.htmlindex.htm;location~.*.(htm|html)${root/home/webfile;#setresourcefileexpires1h;}location~.*.(js|css)${root/home/webfile;#setresourcefileexpires1h;}location~.*.(action*|jsp*)$#isjspandactionand.dofromtomcat{indexindex.action;proxy_passhttp://211.149.207.191:8080;#returlfromtomcat}location~.*.(ico|gif|jpg|jpeg|png|bmp|swf|txt|html|htm)$#Setaccesstostaticfilesdirectlyreadwithouttomcat{root/home/webfile;#ThedefaultWebsiterootdirectorylocationdefinedserverexpires30d;}location/{proxy_passhttp://211.149.207.191:8080;fastcgi_paramSCRIPT_FILENAME$document_root/$fastcgi_script_name;ssion;ssi_silent_errorson;}error_page500502503504/50x.html;location=/50x.html{roothtml;}
我这里由于是tomcat里面的action无后缀名,现在tomcat能够访问,文件也能够访问但是就是直接输入域名index.html跳转到tomcat下面去了。我想要直接输入域名能进入/home/webfile目录
解决方案
本帖最后由 xiangzhongxia 于 2014-07-20 15:56:23 编辑