• 添加代码:

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            proxy_pass http://www.teirea.cn;
        }

        location ~ .*\.(js|css)?$
        {
            proxy_pass http://www.teirea.cn;
        }

  • 重启nginx:

service nginx restart

如下图所示

nginx 反向代理后css,js,图片404

相关文章:

  • 2021-06-24
  • 2021-09-27
  • 2021-05-27
  • 2021-05-29
  • 2021-09-19
  • 2021-09-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-15
  • 2021-08-25
  • 2022-12-23
  • 2021-11-28
  • 2021-08-29
相关资源
相似解决方案