Docker Community Forums

Share and learn in the Docker community.

Docker container with nginx and apache: no nginx cache for css/js


(Mcflay) #1

Hi all,
I have a linux machine (Ubuntu 16.04) where I installed nginx and apache (apt-get install apache2 nginx).
Nginx is configured as reverse proxy server with a stream to apache. I set nginx caching for static files also and everything works properly.
Then I created a docker container with both nginx and apache instances with the same configurations and the result is that nginx cache is working only for html code and images. Instead js and css files are not cached.
Regarding Dockerfile code, my setup is based on: debian8 + a custom apache server + nginx from the image launcher.gcr.io/google/nginx1:1.12
Does anyone have any suggestions?