server {
listen 80 default;
server_name _;
root /alidata/www/default //这个就是静态文件的地址 绝对路径
index index.html index.htm index.jsp;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico|svg|htm)$ {
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 1d;
access_log off;
}
location ~ .*\.(html)$ {
proxy_pass http://127.0.0.1:8080;
}
location ~ /revitbus {
proxy_pass http://127.0.0.1:8080;
}
#access_log /alidata/log/nginx/access/default.log;
access_log off;
}
nginx配置静态资源地址(正确)
最新推荐文章于 2024-08-06 14:41:31 发布