67,513
社区成员
发帖
与我相关
我的任务
分享
server {
listen 80;
server_name fanjianlu.com;
server_name www.fanjianlu.com;
root /home/webfile;
index index.html index.htm;
location ~ .*\.(htm|html)$
{
root /home/webfile; #set resource file
expires 1h;
}
location ~ .*\.(js|css)$
{
root /home/webfile; #set resource file
expires 1h;
}
location ~ .*.(action*|jsp*)$ #is jsp and action and .do from tomcat
{
index index.action;
proxy_pass http://211.149.207.191:8080;#ret url from tomcat
}
location ~ .*\.(ico|gif|jpg|jpeg|png|bmp|swf|txt|html|htm)$ #Set access to static files directly read without tomcat
{
root /home/webfile; #The default Web site root directory location defined server
expires 30d;
}
location / {
proxy_pass http://211.149.207.191:8080;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
ssi on;
ssi_silent_errors on;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}