Nginx resource oriented css js path problem

  
                  

Today's project, learning nginx found that it is not bad, the speed is OK, but CSS JS can not be used, the original nginx configuration needs to configure rules for different types of files, it is very depressed, but still think it makes sense . After the problem is solved, paste the configuration to share. #user nobody; worker_processes 1; error_log logs/error.log; pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log ; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 8081 default; server_name localhost; charset utf-8; location /{ index index.php; if (!-e $request_filename) { #rewrite ^/myapp/(. *\\.(css

Copyright © Windows knowledge All Rights Reserved