java源码部署总结:
环境:nginx+tomcat
部署方式:源码部署1源码目录/chroot2/test/schedule 目录下面就是所有源码了2tomcat
位置: /usr/local/tomcat/apache-tomcat-scheduleweb-test
主要配置文件server.xml
主要注意: 的配置3nginx配置
upstream配置:
upstream tomcat_schedule_web_test{
server localhost:8291 weight=10;
}
server配置:
server
{
listen80;
server_name test.schedule.toys178.com;
index index.jsp index.htm index.php;
root/chroot2/test;
fastcgi_connect_timeout600;
fastcgi_send_timeout600;
fastcgi_read_timeout600;
location/schedule {
proxy_pass http://tomcat_schedule_web_test;
}
location~ .*\.(gif|jpg|jpeg|png|bmp|swf|apk|tar.gz)$
{
expires 30d;
}
location~ .*\.(js|css)?$
{
expires 12h;
}
access_log/chroot/wwwlogs/tomcat_schedule_web_test-access.logaccess;
}
部署方式:war包部署1war包目录/chroot2/test/schedule 目录下面放的是war包,如:ScheduleManage.war2tomcat
位置: /usr/local/tomcat/apache-tomcat-scheduleweb-test
主要配置文件server.xml
主要注意: 的配置3nginx配置
upstream配置:
upstream tomcat_schedule_web_test{
server localhost:8291 weight=10;
}
server配置:
server
{
listen80;
server_name test.schedule.toys178.com;
index index.jsp index.htm index.html;
root/chroot2/test;
location/schedule {
proxy_pass http://tomcat_schedule_web_test;
}
location~ .*\.(gif|jpg|jpeg|png|bmp|swf|apk|tar.gz)$
{
expires 30d;
}
location~ .*\.(js|css)?$
{
expires 12h;
}
access_log/chroot/wwwlogs/tomcat_schedule_web_test-access.logaccess;
}