awsprestashop

Integrate PrestaShop with AWS CloudFront

Follow the steps below:

  • Create an AWS CloudFront Distribution using the AWS Console. Specify the domain for the PrestaShop application.

    PrestaShop configuration

  • Once the CloudFront Distribution has been created, note the auto-generated domain name, as shown below:

    PrestaShop configuration

  • Log in to the server console using SSH.

  • Edit the /opt/bitnami/apps/prestashop/conf/httpd-app.conf file and set the AllowOverride All configuration value.

  • Remove the current /opt/bitnami/apps/prestashop/htdocs/.htaccess file and create an empty one with write privileges using the commands below:

    $ touch /opt/bitnami/apps/prestashop/htdocs/.htaccess
    $ sudo chown daemon /opt/bitnami/apps/prestashop/htdocs/.htaccess
    
  • Log in to the PrestaShop administration panel. Navigate to the “Advanced Parameters -> Performance” page and browse to the “Media Servers” section. Add the domain name for the CloudFront Distribution created previously.

    PrestaShop configuration

  • Browse to the PrestaShop application and check if the images are being served from the CloudFront domain, by viewing any image URL.