本帖最后由 re20y 于 2017-6-4 08:42 编辑
server
{
listen 80;
server_name jsp.mkaliez.com;
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/jsp.mkaliez.com;
#error_page 404/404.html;
error_page 404 /404.html;
error_page 502 /502.html;
#TOMCAT-START
location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|txt|js|css)$
{
rewrite ^/jsp_mkaliez_com/(.*)$ /$1 break;
expires 12h;
}
if ($uri !~ ".*\.php$")
{
rewrite /jsp_mkaliez_com/(.*)$ /jsp_mkaliez_com/$1 break;
rewrite /(.*)$ /jsp_mkaliez_com/$1 break;
}
location /jsp_mkaliez_com
{
proxy_pass "http://127.0.0.1:8080";
proxy_cookie_path /jsp_mkaliez_com /;
proxy_cookie_path /jsp_mkaliez_com/ /;
sub_filter /jsp_mkaliez_com "";
#sub_filter_types text/html;
sub_filter_once off;
}
#TOMCAT-END
include enable-php-70.conf;
include /www/server/panel/vhost/rewrite/jsp.mkaliez.com.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$
{
expires 12h;
access_log off;
}
access_log /www/wwwlogs/jsp.mkaliez.com.log;
}
重装系统 CentOS Linux 7.3.1611 (Core) OVZ架构
|
|