鑒於自己的技術鑿實很菜,就在網上瀏覽技術大牛的博客邊學邊操作,最近發現一件事是就是我在我的百度雲服務器上使用nginx的時候沒有辦法加載靜態資源,網上搜了一些,發現挺簡單的就是在nginx.conf文件中配置:
server { listen 85; server_name server; location /{ proxy_pass_header Server; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; proxy_pass http://99.248.1.150:3389; } location ~ .*\.(js|css|png|jpg)$ { proxy_pass http://99.248.1.150:3389; //設置靜態資源的代理路徑 } }
本人是使用這個方法好使的