• Resolved futureyoon

    (@futureyoon)


    Hi

    I would like to report an issue.
    error message – Server configuration error
    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

    (@mateuszgbiorczyk)

    Hello @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.

    Did this solution help you?

    Best,
    Mateusz

    Thread Starter futureyoon

    (@futureyoon)

    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

    (@mateuszgbiorczyk)

    Thread Starter futureyoon

    (@futureyoon)

    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

    Please confirm it after after enabling it. You will see the different behavior after enabling it..

    Thank you

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @futureyoon I created distribution. The IP address has changed, but the plugin is still working properly.

    Thread Starter futureyoon

    (@futureyoon)

    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

    (@mateuszgbiorczyk)

    @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 – I do not want to enter it here.

    Thread Starter futureyoon

    (@futureyoon)

    sent ?? Thank you

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @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

    (@futureyoon)

    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

    (@mateuszgbiorczyk)

    @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

    (@futureyoon)

    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 3 years, 2 months ago by futureyoon.
    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @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.