📜  nginx proxy_pass 传递 css 资产未加载 - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:30.200000             🧑  作者: Mango

代码示例1
location / {
    proxy_pass http://127.0.0.1:10000;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

location ~ ^/(images/|img/|javascript/|js/|css/|stylesheets/|flash/|media/|static/|robots.txt|humans.txt|favicon.ico) {
    root /root/of/your/public/assets;
    access_log off;
    expires max;
}