server { listen 80; server_name tworldm.labitumall.com; set $platform pc; if ($http_user_agent ~* "(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino") { set $platform mobile; } root /opt/apps/dist/worldm.labitumall.com/; location /static/js { root /opt/apps/dist/worldm.labitumall.com; expires 30d; gzip_static on; } location /static/css { root /opt/apps/dist/worldm.labitumall.com; expires 30d; gzip_static on; } location /static/img { root /opt/apps/dist/worldm.labitumall.com; expires 30d; } location =/favicon.ico { root /opt/apps/dist/worldm.labitumall.com; expires 30d; } location / { try_files $uri $uri/ /index.html; expires 30d; #rewrite ^(.*)$ /static/authpay.htm break; } }