最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

proxy - Wordpress is not loading resources

programmeradmin1浏览0评论

After installing wordpress via the following docker-compose file found at the compose website. I use nginx as a reverse proxy to the external container port. I have used certbot to enable ssl on the website by generating a certificate and the redirects.

The problem I have is that no css or js is loading whatsoever.

How do I configure SSL in such a way that wordpress is still loading the right resources?

Edit:

Added the compose file below.

version: '3.3'

services:
   db:
     image: mysql:5.7
     volumes:
       - db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: somewordpress
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wordpress
       MYSQL_PASSWORD: wordpress

   wordpress:
     depends_on:
       - db
     image: wordpress:latest
     ports:
       - "8000:80"
     restart: always
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_USER: wordpress
       WORDPRESS_DB_PASSWORD: wordpress
       WORDPRESS_DB_NAME: wordpress
volumes:
    db_data: {}

After installing wordpress via the following docker-compose file found at the compose website. I use nginx as a reverse proxy to the external container port. I have used certbot to enable ssl on the website by generating a certificate and the redirects.

The problem I have is that no css or js is loading whatsoever.

How do I configure SSL in such a way that wordpress is still loading the right resources?

Edit:

Added the compose file below.

version: '3.3'

services:
   db:
     image: mysql:5.7
     volumes:
       - db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: somewordpress
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wordpress
       MYSQL_PASSWORD: wordpress

   wordpress:
     depends_on:
       - db
     image: wordpress:latest
     ports:
       - "8000:80"
     restart: always
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_USER: wordpress
       WORDPRESS_DB_PASSWORD: wordpress
       WORDPRESS_DB_NAME: wordpress
volumes:
    db_data: {}
Share Improve this question asked Jul 2, 2019 at 13:04 gijs entiusgijs entius
Add a comment  | 

1 Answer 1

Reset to default 0

You probably have to set your Site Settings to https:// instead of http:// either through the admin screen, or the wp-config.php.

Failing to do so will cause WordPress to output the resources as non-secure, and your browser will reject them.

发布评论

评论列表(0)

  1. 暂无评论