10up / wp-local-docker-v2

ARCHIVED: A simple Docker based development environment for WordPress.
MIT License
484 stars 81 forks source link

Statics under theme folder doesn't served #59

Closed thiras closed 4 years ago

thiras commented 4 years ago

Describe the bug Somehow nginx doesn't serve any static under the theme folder.

Steps to Reproduce

  1. Create new environment with latest php
  2. Upload understrap theme (for example) into wp-content/theme
  3. Check Themes menu under wordpress. Theme screenshot.png doesn't load.
  4. Activate the theme and check site which doesn't have any statics.

Expected behavior Statics should be loaded correctly

Screenshots

Environment information

Additional context I've double check with non dockerized deployment. Theme works fine. But the problem is 10updocker. I've also double check the ownership and permissions. Everything seems fine.

It redirects me to wordpress' 404 page.

Here is the error;

phpfpm_1         | 172.22.0.6 -  22/Nov/2019:13:12:19 +0000 "GET /index.php" 200
nginx_1          | 10.0.0.3 - - [22/Nov/2019:13:12:19 +0000] "GET / HTTP/1.1" 200 16559 "http://kumbhaka.test/wp-admin/themes.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"
nginx_1          | 2019/11/22 13:12:19 [crit] 6#6: *111 stat() "/var/www/html/wp-content/themes/kumbhaka/css/child-theme.min.css" failed (13: Permission denied), client: 10.0.0.3, server: localhost, request: "GET /wp-content/themes/kumbhaka/css/child-theme.min.css?ver=0.5.3 HTTP/1.1", host: "kumbhaka.test", referrer: "http://kumbhaka.test/"
nginx_1          | 2019/11/22 13:12:19 [crit] 6#6: *111 stat() "/var/www/html/wp-content/themes/kumbhaka/css/child-theme.min.css" failed (13: Permission denied), client: 10.0.0.3, server: localhost, request: "GET /wp-content/themes/kumbhaka/css/child-theme.min.css?ver=0.5.3 HTTP/1.1", host: "kumbhaka.test", referrer: "http://kumbhaka.test/"
nginx_1          | 2019/11/22 13:12:19 [crit] 6#6: *111 stat() "/var/www/html/wp-content/themes/kumbhaka/css/child-theme.min.css" failed (13: Permission denied), client: 10.0.0.3, server: localhost, request: "GET /wp-content/themes/kumbhaka/css/child-theme.min.css?ver=0.5.3 HTTP/1.1", host: "kumbhaka.test", referrer: "http://kumbhaka.test/"
nginx_1          | 2019/11/22 13:12:19 [crit] 6#6: *113 stat() "/var/www/html/wp-content/themes/understrap/js/popper.min.js" failed (13: Permission denied), client: 10.0.0.3, server: localhost, request: "GET /wp-content/themes/understrap/js/popper.min.js?ver=5.3 HTTP/1.1", host: "kumbhaka.test", referrer: "http://kumbhaka.test/"
nginx_1          | 2019/11/22 13:12:19 [crit] 6#6: *113 stat() "/var/www/html/wp-content/themes/understrap/js/popper.min.js" failed (13: Permission denied), client: 10.0.0.3, server: localhost, request: "GET /wp-content/themes/understrap/js/popper.min.js?ver=5.3 HTTP/1.1", host: "kumbhaka.test", referrer: "http://kumbhaka.test/"
nginx_1          | 2019/11/22 13:12:19 [crit] 6#6: *113 stat() "/var/www/html/wp-content/themes/understrap/js/popper.min.js" failed (13: Permission denied), client: 10.0.0.3, server: localhost, request: "GET /wp-content/themes/understrap/js/popper.min.js?ver=5.3 HTTP/1.1", host: "kumbhaka.test", referrer: "http://kumbhaka.test/"
phpfpm_1         | 172.22.0.6 -  22/Nov/2019:13:12:19 +0000 "GET /index.php" 404
nginx_1          | 10.0.0.3 - - [22/Nov/2019:13:12:19 +0000] "GET /wp-content/themes/kumbhaka/css/child-theme.min.css?ver=0.5.3 HTTP/1.1" 404 15594 "http://kumbhaka.test/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"
phpfpm_1         | 172.22.0.6 -  22/Nov/2019:13:12:19 +0000 "GET /index.php" 404
nginx_1          | 10.0.0.3 - - [22/Nov/2019:13:12:19 +0000] "GET /wp-content/themes/understrap/js/popper.min.js?ver=5.3 HTTP/1.1" 404 15587 "http://kumbhaka.test/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"
nginx_1          | 2019/11/22 13:12:19 [crit] 6#6: *115 stat() "/var/www/html/wp-content/themes/kumbhaka/js/child-theme.min.js" failed (13: Permission denied), client: 10.0.0.3, server: localhost, request: "GET /wp-content/themes/kumbhaka/js/child-theme.min.js?ver=0.5.3 HTTP/1.1", host: "kumbhaka.test", referrer: "http://kumbhaka.test/"
nginx_1          | 2019/11/22 13:12:19 [crit] 6#6: *115 stat() "/var/www/html/wp-content/themes/kumbhaka/js/child-theme.min.js" failed (13: Permission denied), client: 10.0.0.3, server: localhost, request: "GET /wp-content/themes/kumbhaka/js/child-theme.min.js?ver=0.5.3 HTTP/1.1", host: "kumbhaka.test", referrer: "http://kumbhaka.test/"
nginx_1          | 2019/11/22 13:12:19 [crit] 6#6: *115 stat() "/var/www/html/wp-content/themes/kumbhaka/js/child-theme.min.js" failed (13: Permission denied), client: 10.0.0.3, server: localhost, request: "GET /wp-content/themes/kumbhaka/js/child-theme.min.js?ver=0.5.3 HTTP/1.1", host: "kumbhaka.test", referrer: "http://kumbhaka.test/"
phpfpm_1         | 172.22.0.6 -  22/Nov/2019:13:12:19 +0000 "GET /index.php" 404
nginx_1          | 10.0.0.3 - - [22/Nov/2019:13:12:20 +0000] "GET /wp-content/themes/kumbhaka/js/child-theme.min.js?ver=0.5.3 HTTP/1.1" 404 15592 "http://kumbhaka.test/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"
phpfpm_1         | 172.22.0.6 -  22/Nov/2019:13:12:33 +0000 "POST /wp-admin/admin-ajax.php" 200
nginx_1          | 10.0.0.3 - - [22/Nov/2019:13:12:33 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 58 "http://kumbhaka.test/wp-admin/themes.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"
thiras commented 4 years ago

I've located the problem. The parent theme had bad permissions.