【发布时间】:2017-06-25 17:55:46
【问题描述】:
我已经在 Symfony 3 中使用 nginx 和 docker 启动了新项目。它工作得很好,但我的资产没有在web/assets/bundle.js 中更新。更新后我检查我的bundle.js,我看到的是旧版本。
我已经删除了 Symfony 缓存和浏览器,但没有结果:
php bin/console assets:install
我的 nginx 配置:
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 2048;
multi_accept on;
use epoll;
}
http {
server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log off;
error_log off;
gzip on;
gzip_disable "msie6";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
open_file_cache max=100;
}
还有 Symfony:
server {
listen 80; ## listen for ipv4; this line is default and implied
listen [::]:80 default_server ipv6only=on; ## listen for ipv6
server_name 127.0.0.1 0.0.0.0 myApp.local;
root /var/www/lfdw/web;
location ~ ^(.*)/(app|app_dev|app_test|config)\.php(/|$) {
fastcgi_pass php-upstream;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
error_log /var/log/nginx/symfony_error.log;
access_log /var/log/nginx/symfony_access.log;
}
你有什么想法吗?
谢谢!
【问题讨论】:
标签: caching nginx docker symfony