server { listen 80; autoindex on; server_name admin.happymmall.com; access_log /usr/local/nginx/logs/access.log combined; index index.html index.htm index.jsp index.php; #root /devsoft/apache-tomcat-7.0.73/webapps/mmall; #error_page 404 /404.html; if ( $query_string ~* ".*[\;'\<\>].*" ){ return 404; } location = / { root /product/front/mmall_admin_fe/dist/view; index index.html; } location ~ .*\.(html|htm)$ { root /product/front/mmall_admin_fe/dist/view; index index.html; } location / { proxy_pass http://127.0.0.1:8080/; add_header Access-Control-Allow-Origin '*'; } }