Changing the base URL path on for resources on a page

Edward Ziadeh • 8 March 2019
Blog in group Drupal 8
0 comments
0 likes

I have created ACM in AWS and did all the required settings, but I have a message that says Mixed content.

In the admin it worked good, the reason was that the file system use a base url with http.

To change it I edited the settings.php file.

Uncomment:

# $settings['file_public_base_url'] = 'http://downloads.example.com/files';
/**
 * Public file base URL:
 *
 * An alternative base URL to be used for serving public files. This must
 * include any leading directory path.
 *
 * A different value from the domain used by Drupal to be used for accessing
 * public files. This can be used for a simple CDN integration, or to improve
 * security by serving user-uploaded files from a different domain or subdomain
 * pointing to the same server. Do not include a trailing slash.
 */
 $settings['file_public_base_url'] = 'https://www.example.com/sites/default/files';

/**
 * Public file path:
 *
 * A local file system path where public files will be stored. This directory
 * must exist and be writable by Drupal. This directory must be relative to
 * the Drupal installation directory and be accessible over the web.
 */
# $settings['file_public_path'] = 'sites/default/files';