简体   繁体   中英

WordPress Site Deployment in Docker with Reverse NGINX proxy

I have a Wordpress site with a custom theme and plugins that I built locally. It runs in docker container. For deployment, I use NGINX running as a process on EC2 server as a reverse proxy for Dockerized apps. I also use letsencrypt SSL certificates in NGINX.

After getting Admin UI to work over HTTPS, I find that my site is not loading asset files (css, scripts, images).

The following Gist shows all my files:

https://gist.github.com/vzelenko/ee1a1a5f833dbb94e9b0591e59df6ee8

Anyone knows why the site is not loading files with this config?

I think the problem is the fact that you are not passing the files to the WP container try adding the files by mounting them :

 volumes:
   - ./yourcontent/:/var/www/html/wp-content
   - ./yourwordpress/html/:/var/www/html/
   - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini

something like that

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM