server { listen 80; autoindex on; server_name happymmall.com www.happymmall.com; access_log /usr/local/nginx/logs/access.log combined; index index.html index.htm index.jsp index.php; if ( $query_string ~* ".*[\;'\<\>].*" ){ return 404; } location = / { root /product/front/mmall_fe/dist/view; index index.html; } location ~ .*\.html$ { root /product/front/mmall_fe/dist/view; index index.html; } location / { proxy_pass http://127.0.0.1:8080/; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico)$ { proxy_pass http://127.0.0.1:8080; expires 30d; } location ~ .*\.(js|css)?$ { proxy_pass http://127.0.0.1:8080; expires 7d; } }