Title: webp + cloudfront (cdn) error
Last modified: September 24, 2021

---

# webp + cloudfront (cdn) error

 *  Resolved [futureyoon](https://wordpress.org/support/users/futureyoon/)
 * (@futureyoon)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/)
 * Hi
 * I would like to report an issue.
    error message – Server configuration error 
   [https://prnt.sc/1tfwifo](https://prnt.sc/1tfwifo)
 * I know this is not the first time seeing this error. I have read all other support
   articles that you helped others.
 * Recently I was testing AWS Lightsail (Debian-Apache-Bitnami) + Cloudfront (CDN).
   Webp was working fine before I turned on Cloudfornt (CDN) – I can turn off CDN
   and enable webp back.
 * Before turnining cloudfront, I could see the .htaccess files in 3 locations were
   well updated automatically upon saving.
    But after I enabled the CDN, I could
   see the webp doesnt work any more with the error (screenshot above). I noticed
   the the contents of those .htaccess files (in all 3) are getting wiped off upon
   saving the webp settings (as part of trying to fix the issue). .htaccess method&
   nginx method both throw the same error..
 * I tested with clean latest WP version without single plugin installed.
    so I 
   can say it’s webp with cloudfront…
 * I hope you can experience it yourself too in AWS lightsail or you have already
   exp, please share how to overcome this error.
 * Thank you

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/#post-14905039)
 * Hello [@futureyoon](https://wordpress.org/support/users/futureyoon/),
 * Thanks for your message.
 * Yes, I tested this configuration. The problem is that by default, the **“AllowOverride”**
   parameter is set to **“None”** in the virtual host settings for Apache.
 * Here are the steps I followed:
    1.  Enter the Amazon Lightsail panel.
    2.  Go to the **“Instances”** tab.
    3.  Next to your WordPress instance, click **“Manage”**.
    4.  Click the **“Connect using SSH”** button.
    5.  A terminal window will open.
    6.  Edit the file using the command:
         `nano /opt/bitnami/apache2/conf/vhosts/wordpress-
        vhost.conf`
    7.  Find the value **“AllowOverride None”** and replace it with the value **“AllowOverride
        All”**.
    8.  Exit the file confirming that the changes are saved.
    9.  Run Apache restart process with command:
         `sudo /opt/bitnami/ctlscript.sh restart
        apache`
 * It is also described [here](https://docs.bitnami.com/aws/infrastructure/lamp/administration/use-htaccess/).
 * Did this solution help you?
 * Best,
    Mateusz
 *  Thread Starter [futureyoon](https://wordpress.org/support/users/futureyoon/)
 * (@futureyoon)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/#post-14905408)
 * Thank you so much for the prompt reply. I tried but somehow didnt get fixed.
 * Take a look..
 * I even rebooted the instanece too but still the same… Weird..
    Please advise.
 * Thank you
 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/#post-14905494)
 * [@futureyoon](https://wordpress.org/support/users/futureyoon/) This solution 
   worked for me:
    [https://www.youtube.com/watch?v=2W4P9kI7NDY](https://www.youtube.com/watch?v=2W4P9kI7NDY)
 *  Thread Starter [futureyoon](https://wordpress.org/support/users/futureyoon/)
 * (@futureyoon)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/#post-14905891)
 * Hi
 * Did you test this after enabling the distribution?
    From your screen, it appears
   that you have not enabled to distribution yet. [https://www.screencast.com/t/ZBdEvnyF](https://www.screencast.com/t/ZBdEvnyF)
 * Please confirm it after after enabling it. You will see the different behavior
   after enabling it..
 * Thank you
 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/#post-14905972)
 * [@futureyoon](https://wordpress.org/support/users/futureyoon/) I created distribution.
   The IP address has changed, but the plugin is still working properly.
 *  Thread Starter [futureyoon](https://wordpress.org/support/users/futureyoon/)
 * (@futureyoon)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/#post-14906012)
 * Hmmm… interesting…
 * Do you see .htaccess file at the 3 locations? wp-content, wp-content/uploads,
   wp-content/uploads-webpc ?
 * I tried to set up a brandnew just now… I don’t see the htaccess files at above
   location any more… so it should be there or it should not??
 * can you help yours (that is working on AWS)?
    I am out of idea… Please advise.
 * Thank you
 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/#post-14906147)
 * [@futureyoon](https://wordpress.org/support/users/futureyoon/) Are you able to
   create a test environment for me where I could safely find a solution? You will
   find my e-mail address on [my website](https://gbiorczyk.pl/) – I do not want
   to enter it here.
 *  Thread Starter [futureyoon](https://wordpress.org/support/users/futureyoon/)
 * (@futureyoon)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/#post-14906406)
 * sent 🙂 Thank you
 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/#post-14907885)
 * [@futureyoon](https://wordpress.org/support/users/futureyoon/) Thank you very
   much for your support. I think I was able to find a solution.
 * Below is the updated AWS Lightsail configuration guide:
    1.  Enter the Amazon Lightsail panel.
    2.  Go to the **“Instances”** tab.
    3.  Next to your WordPress instance, click **“Manage”**.
    4.  Click the **“Connect using SSH”** button.
    5.  A terminal window will open.
    6.  Edit the file using the command:
         `nano /opt/bitnami/apache2/conf/vhosts/wordpress-
        vhost.conf`
    7.  Find the value **“AllowOverride None”** and replace it with the value **“AllowOverride
        All”**.
    8.  Exit the file confirming that the changes are saved.
    9.  Edit the file using the command:
         `nano /opt/bitnami/apache2/conf/vhosts/wordpress-
        https-vhost.conf`
    10. Find the value **“AllowOverride None”** and replace it with the value **“AllowOverride
        All”**.
    11. Exit the file confirming that the changes are saved.
    12. Run Apache restart process with command:
         `sudo /opt/bitnami/ctlscript.sh restart
        apache`
 * Did this solution help you?
 *  Thread Starter [futureyoon](https://wordpress.org/support/users/futureyoon/)
 * (@futureyoon)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/#post-14909309)
 * Thx for the update. but the issue still persists with the same error… I updated
   those 2 files and rebooted.. can you help check what else is missing?
 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/#post-14909502)
 * [@futureyoon](https://wordpress.org/support/users/futureyoon/) It probably has
   to do with CDN and content caching in CloudFront. The plugin adds the _“Cache-
   Control: private”_ header, but the CDN probably ignores it.
 * I do not know to solve this problem. Forgive me, but I can not help you.
 *  Thread Starter [futureyoon](https://wordpress.org/support/users/futureyoon/)
 * (@futureyoon)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/#post-14909739)
 * Hi
 * OK. I guess it’s something to do with the distribution setting.
    May I know the
   name/title of the webp cache? so that I can set CDN to accept the value form 
   XXX header that webp is sending?
 * Thank you
    -  This reply was modified 4 years, 8 months ago by [futureyoon](https://wordpress.org/support/users/futureyoon/).
 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/#post-14909892)
 * [@futureyoon](https://wordpress.org/support/users/futureyoon/) See what the .
   htaccess file looks like in the /uploads directory. There you will find all the
   information.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘webp + cloudfront (cdn) error’ is closed to new replies.

 * ![](https://ps.w.org/webp-converter-for-media/assets/icon-256x256.png?rev=2636288)
 * [Converter for Media - Optimize images | Convert WebP & AVIF](https://wordpress.org/plugins/webp-converter-for-media/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/webp-converter-for-media/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/webp-converter-for-media/)
 * [Active Topics](https://wordpress.org/support/plugin/webp-converter-for-media/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/webp-converter-for-media/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/webp-converter-for-media/reviews/)

## Tags

 * [aws](https://wordpress.org/support/topic-tag/aws/)
 * [CloudFront](https://wordpress.org/support/topic-tag/cloudfront/)
 * [Lightsail](https://wordpress.org/support/topic-tag/lightsail/)

 * 13 replies
 * 2 participants
 * Last reply from: [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/webp-cloudfront-cdn-error/#post-14909892)
 * Status: resolved